new project structure

This commit is contained in:
BlackMATov
2023-02-05 14:44:34 +07:00
parent 2e8e999412
commit 6f036986bf
45 changed files with 428 additions and 329 deletions

29
headers/.clangd Normal file
View File

@@ -0,0 +1,29 @@
Diagnostics:
ClangTidy:
Add:
- bugprone-*
- clang-analyzer-*
- concurrency-*
- cppcoreguidelines-*
- misc-*
- modernize-*
- performance-*
- portability-*
- readability-*
Remove:
- bugprone-easily-swappable-parameters
- bugprone-macro-parentheses
- cppcoreguidelines-avoid-magic-numbers
- cppcoreguidelines-macro-usage
- misc-no-recursion
- misc-non-private-member-variables-in-classes
- misc-unused-using-decls
- modernize-use-trailing-return-type
- readability-identifier-length
- readability-magic-numbers
- readability-named-parameter
- readability-redundant-access-specifiers
- readability-uppercase-literal-suffix
CompileFlags:
CompilationDatabase: ../develop/.cdb

View File

@@ -20,6 +20,7 @@ namespace vmath_hpp::detail
class mat_base<T, 2> {
public:
using row_type = vec<T, 2>;
// NOLINTNEXTLINE(*-avoid-c-arrays)
row_type rows[2];
public:
constexpr mat_base()
@@ -77,6 +78,7 @@ namespace vmath_hpp::detail
class mat_base<T, 3> {
public:
using row_type = vec<T, 3>;
// NOLINTNEXTLINE(*-avoid-c-arrays)
row_type rows[3];
public:
constexpr mat_base()
@@ -151,6 +153,7 @@ namespace vmath_hpp::detail
class mat_base<T, 4> {
public:
using row_type = vec<T, 4>;
// NOLINTNEXTLINE(*-avoid-c-arrays)
row_type rows[4];
public:
constexpr mat_base()

View File

@@ -37,6 +37,7 @@ namespace vmath_hpp::detail
constexpr explicit operator vec<U, 4>() const { return vec<U, 4>(v, s); }
template < typename U, std::enable_if_t<std::is_convertible_v<U, T>, int> = 0 >
// NOLINTNEXTLINE(*-pointer-arithmetic)
constexpr explicit qua_base(const U* p): qua_base(p[0], p[1], p[2], p[3]) {}
[[nodiscard]] constexpr T& operator[](std::size_t index) noexcept {

View File

@@ -38,6 +38,7 @@ namespace vmath_hpp::detail
constexpr explicit vec_base(const vec_base<U, 4>& other): vec_base(other[0], other[1]) {}
template < typename U, std::enable_if_t<std::is_convertible_v<U, T>, int> = 0 >
// NOLINTNEXTLINE(*-pointer-arithmetic)
constexpr explicit vec_base(const U* p): vec_base(p[0], p[1]) {}
[[nodiscard]] constexpr T& operator[](std::size_t index) noexcept {
@@ -82,6 +83,7 @@ namespace vmath_hpp::detail
constexpr explicit vec_base(const vec_base<U, 4>& other): vec_base(other[0], other[1], other[2]) {}
template < typename U, std::enable_if_t<std::is_convertible_v<U, T>, int> = 0 >
// NOLINTNEXTLINE(*-pointer-arithmetic)
constexpr explicit vec_base(const U* p): vec_base(p[0], p[1], p[2]) {}
[[nodiscard]] constexpr T& operator[](std::size_t index) noexcept {
@@ -130,6 +132,7 @@ namespace vmath_hpp::detail
constexpr vec_base(const vec_base<U, 4>& other): vec_base(other[0], other[1], other[2], other[3]) {}
template < typename U, std::enable_if_t<std::is_convertible_v<U, T>, int> = 0 >
// NOLINTNEXTLINE(*-pointer-arithmetic)
constexpr explicit vec_base(const U* p): vec_base(p[0], p[1], p[2], p[3]) {}
[[nodiscard]] constexpr T& operator[](std::size_t index) noexcept {