Skip to content

Commit 82ce926

Browse files
committed
Remove initialization from aligned_array
1 parent 71a4184 commit 82ce926

2 files changed

Lines changed: 12 additions & 8 deletions

File tree

include/kernel_float/base.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,15 @@ struct alignas(Alignment) aligned_array {
2222
return items_;
2323
}
2424

25-
T items_[N] = {};
25+
T items_[N];
2626
};
2727

2828
template<typename T, size_t Alignment>
2929
struct alignas(Alignment) aligned_array<T, 1, Alignment> {
30+
aligned_array() = default;
31+
3032
KERNEL_FLOAT_INLINE
31-
aligned_array(T item = {}) : item_(item) {}
33+
aligned_array(T item) : item_(item) {}
3234

3335
KERNEL_FLOAT_INLINE
3436
operator T() const {
@@ -45,7 +47,7 @@ struct alignas(Alignment) aligned_array<T, 1, Alignment> {
4547
return &item_;
4648
}
4749

48-
T item_ = {};
50+
T item_;
4951
};
5052

5153
template<typename T, size_t Alignment>

single_include/kernel_float.h

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616

1717
//================================================================================
1818
// this file has been auto-generated, do not modify its contents!
19-
// date: 2026-03-02 16:31:41.575770
20-
// git hash: a9bc5a6b4eaaa934175759ad44eb4b3b89f7ded2
19+
// date: 2026-03-11 14:47:12.426233
20+
// git hash: 71a4184bf9d9b58ed9a90ace21cee3391d0d5f2a
2121
//================================================================================
2222

2323
#ifndef KERNEL_FLOAT_MACROS_H
@@ -424,13 +424,15 @@ struct alignas(Alignment) aligned_array {
424424
return items_;
425425
}
426426

427-
T items_[N] = {};
427+
T items_[N];
428428
};
429429

430430
template<typename T, size_t Alignment>
431431
struct alignas(Alignment) aligned_array<T, 1, Alignment> {
432+
aligned_array() = default;
433+
432434
KERNEL_FLOAT_INLINE
433-
aligned_array(T item = {}) : item_(item) {}
435+
aligned_array(T item) : item_(item) {}
434436

435437
KERNEL_FLOAT_INLINE
436438
operator T() const {
@@ -447,7 +449,7 @@ struct alignas(Alignment) aligned_array<T, 1, Alignment> {
447449
return &item_;
448450
}
449451

450-
T item_ = {};
452+
T item_;
451453
};
452454

453455
template<typename T, size_t Alignment>

0 commit comments

Comments
 (0)