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-float-equal
-Wno-shadow-field-in-constructor -Wno-shadow-field-in-constructor
-Wno-unknown-warning-option -Wno-unknown-warning-option
-Wno-unsafe-buffer-usage
>) >)
target_link_libraries(${PROJECT_NAME}.setup_targets INTERFACE target_link_libraries(${PROJECT_NAME}.setup_targets INTERFACE

View File

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

View File

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

View File

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