some no_init behavior fixes

This commit is contained in:
BlackMATov
2023-06-05 21:07:11 +07:00
parent 96a6a42db7
commit 1b7a3358de
4 changed files with 9 additions and 8 deletions

View File

@@ -15,6 +15,7 @@ target_compile_options(${PROJECT_NAME}.setup_targets INTERFACE
-Wno-float-equal
-Wno-shadow-field-in-constructor
-Wno-unknown-warning-option
-Wno-unsafe-buffer-usage
>)
target_link_libraries(${PROJECT_NAME}.setup_targets INTERFACE

View File

@@ -1912,7 +1912,7 @@ namespace vmath_hpp::detail
public:
using row_type = vec<T, 2>;
// NOLINTNEXTLINE(*-avoid-c-arrays)
row_type rows[2];
row_type rows[2]{no_init, no_init};
public:
constexpr mat_base()
: mat_base(identity_init) {}
@@ -1970,7 +1970,7 @@ namespace vmath_hpp::detail
public:
using row_type = vec<T, 3>;
// NOLINTNEXTLINE(*-avoid-c-arrays)
row_type rows[3];
row_type rows[3]{no_init, no_init, no_init};
public:
constexpr mat_base()
: mat_base(identity_init) {}
@@ -2045,7 +2045,7 @@ namespace vmath_hpp::detail
public:
using row_type = vec<T, 4>;
// NOLINTNEXTLINE(*-avoid-c-arrays)
row_type rows[4];
row_type rows[4]{no_init, no_init, no_init, no_init};
public:
constexpr mat_base()
: mat_base(identity_init) {}
@@ -3026,7 +3026,7 @@ namespace vmath_hpp::detail
template < typename T >
class qua_base {
public:
vec<T, 3> v;
vec<T, 3> v{no_init};
T s;
public:
constexpr qua_base()

View File

@@ -21,7 +21,7 @@ namespace vmath_hpp::detail
public:
using row_type = vec<T, 2>;
// NOLINTNEXTLINE(*-avoid-c-arrays)
row_type rows[2];
row_type rows[2]{no_init, no_init};
public:
constexpr mat_base()
: mat_base(identity_init) {}
@@ -79,7 +79,7 @@ namespace vmath_hpp::detail
public:
using row_type = vec<T, 3>;
// NOLINTNEXTLINE(*-avoid-c-arrays)
row_type rows[3];
row_type rows[3]{no_init, no_init, no_init};
public:
constexpr mat_base()
: mat_base(identity_init) {}
@@ -154,7 +154,7 @@ namespace vmath_hpp::detail
public:
using row_type = vec<T, 4>;
// NOLINTNEXTLINE(*-avoid-c-arrays)
row_type rows[4];
row_type rows[4]{no_init, no_init, no_init, no_init};
public:
constexpr mat_base()
: mat_base(identity_init) {}

View File

@@ -16,7 +16,7 @@ namespace vmath_hpp::detail
template < typename T >
class qua_base {
public:
vec<T, 3> v;
vec<T, 3> v{no_init};
T s;
public:
constexpr qua_base()