mirror of
https://github.com/BlackMATov/vmath.hpp.git
synced 2025-12-16 14:11:28 +07:00
fix new clang-tidy warnings
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
Diagnostics:
|
||||
UnusedIncludes: None
|
||||
MissingIncludes: None
|
||||
ClangTidy:
|
||||
Add:
|
||||
- bugprone-*
|
||||
@@ -24,6 +26,3 @@ Diagnostics:
|
||||
- readability-named-parameter
|
||||
- readability-redundant-access-specifiers
|
||||
- readability-uppercase-literal-suffix
|
||||
|
||||
CompileFlags:
|
||||
CompilationDatabase: ../develop/.cdb
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace vmath_hpp::detail
|
||||
{
|
||||
struct hash_combiner {
|
||||
template < typename T >
|
||||
[[nodiscard]] std::size_t operator()(std::size_t seed, const T& x) noexcept {
|
||||
[[nodiscard]] std::size_t operator()(std::size_t seed, const T& x) const noexcept {
|
||||
return (seed ^= std::hash<T>{}(x) + 0x9e3779b9 + (seed << 6) + ( seed >> 2));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -262,6 +262,7 @@ namespace vmath_hpp
|
||||
using base_type::mat_base;
|
||||
using base_type::rows;
|
||||
|
||||
// NOLINTNEXTLINE(*-noexcept-swap)
|
||||
void swap(mat& other) noexcept(std::is_nothrow_swappable_v<T>) {
|
||||
for ( std::size_t i = 0; i < Size; ++i ) {
|
||||
using std::swap;
|
||||
@@ -356,6 +357,7 @@ namespace vmath_hpp
|
||||
// swap
|
||||
|
||||
template < typename T, std::size_t Size >
|
||||
// NOLINTNEXTLINE(*-noexcept-swap)
|
||||
void swap(mat<T, Size>& l, mat<T, Size>& r) noexcept(noexcept(l.swap(r))) {
|
||||
l.swap(r);
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace vmath_hpp::detail::impl
|
||||
template < typename A, std::size_t Size, typename F, std::size_t... Is >
|
||||
[[nodiscard]] constexpr VMATH_HPP_FORCE_INLINE
|
||||
auto map_join_impl(
|
||||
F&& f,
|
||||
F&& f, // NOLINT(*-missing-std-forward)
|
||||
const mat<A, Size>& a,
|
||||
std::index_sequence<Is...>)
|
||||
{
|
||||
@@ -29,7 +29,7 @@ namespace vmath_hpp::detail::impl
|
||||
template < typename A, typename B, std::size_t Size, typename F, std::size_t... Is >
|
||||
[[nodiscard]] constexpr VMATH_HPP_FORCE_INLINE
|
||||
auto map_join_impl(
|
||||
F&& f,
|
||||
F&& f, // NOLINT(*-missing-std-forward)
|
||||
const mat<A, Size>& a,
|
||||
const mat<B, Size>& b,
|
||||
std::index_sequence<Is...>)
|
||||
@@ -40,7 +40,7 @@ namespace vmath_hpp::detail::impl
|
||||
template < typename A, typename B, std::size_t Size, typename F, std::size_t... Is >
|
||||
[[nodiscard]] constexpr VMATH_HPP_FORCE_INLINE
|
||||
auto fold_join_impl(
|
||||
F&& f,
|
||||
F&& f, // NOLINT(*-missing-std-forward)
|
||||
A init,
|
||||
const mat<B, Size>& b,
|
||||
std::index_sequence<Is...>)
|
||||
@@ -51,7 +51,7 @@ namespace vmath_hpp::detail::impl
|
||||
template < typename A, std::size_t Size, typename F, std::size_t... Is >
|
||||
[[nodiscard]] constexpr VMATH_HPP_FORCE_INLINE
|
||||
auto fold1_and_join_impl(
|
||||
F&& f,
|
||||
F&& f, // NOLINT(*-missing-std-forward)
|
||||
const mat<A, Size>& a,
|
||||
std::index_sequence<Is...>)
|
||||
{
|
||||
@@ -61,7 +61,7 @@ namespace vmath_hpp::detail::impl
|
||||
template < typename A, typename B, std::size_t Size, typename F, std::size_t... Is >
|
||||
[[nodiscard]] constexpr VMATH_HPP_FORCE_INLINE
|
||||
auto fold1_and_join_impl(
|
||||
F&& f,
|
||||
F&& f, // NOLINT(*-missing-std-forward)
|
||||
const mat<A, Size>& a,
|
||||
const mat<B, Size>& b,
|
||||
std::index_sequence<Is...>)
|
||||
@@ -72,7 +72,7 @@ namespace vmath_hpp::detail::impl
|
||||
template < typename A, std::size_t Size, typename F, std::size_t... Is >
|
||||
[[nodiscard]] constexpr VMATH_HPP_FORCE_INLINE
|
||||
auto fold1_or_join_impl(
|
||||
F&& f,
|
||||
F&& f, // NOLINT(*-missing-std-forward)
|
||||
const mat<A, Size>& a,
|
||||
std::index_sequence<Is...>)
|
||||
{
|
||||
@@ -82,7 +82,7 @@ namespace vmath_hpp::detail::impl
|
||||
template < typename A, typename B, std::size_t Size, typename F, std::size_t... Is >
|
||||
[[nodiscard]] constexpr VMATH_HPP_FORCE_INLINE
|
||||
auto fold1_or_join_impl(
|
||||
F&& f,
|
||||
F&& f, // NOLINT(*-missing-std-forward)
|
||||
const mat<A, Size>& a,
|
||||
const mat<B, Size>& b,
|
||||
std::index_sequence<Is...>)
|
||||
@@ -93,7 +93,7 @@ namespace vmath_hpp::detail::impl
|
||||
template < typename A, typename B, std::size_t Size, typename F, std::size_t... Is >
|
||||
[[nodiscard]] constexpr VMATH_HPP_FORCE_INLINE
|
||||
auto fold1_plus_join_impl(
|
||||
F&& f,
|
||||
F&& f, // NOLINT(*-missing-std-forward)
|
||||
const vec<A, Size>& a,
|
||||
const mat<B, Size>& b,
|
||||
std::index_sequence<Is...>)
|
||||
|
||||
@@ -90,6 +90,7 @@ namespace vmath_hpp
|
||||
using base_type::qua_base;
|
||||
using base_type::operator[];
|
||||
|
||||
// NOLINTNEXTLINE(*-noexcept-swap)
|
||||
void swap(qua& other) noexcept(std::is_nothrow_swappable_v<T>) {
|
||||
for ( std::size_t i = 0; i < size; ++i ) {
|
||||
using std::swap;
|
||||
@@ -156,6 +157,7 @@ namespace vmath_hpp
|
||||
// swap
|
||||
|
||||
template < typename T >
|
||||
// NOLINTNEXTLINE(*-noexcept-swap)
|
||||
void swap(qua<T>& l, qua<T>& r) noexcept(noexcept(l.swap(r))) {
|
||||
l.swap(r);
|
||||
}
|
||||
|
||||
@@ -182,6 +182,7 @@ namespace vmath_hpp
|
||||
using base_type::vec_base;
|
||||
using base_type::operator[];
|
||||
|
||||
// NOLINTNEXTLINE(*-noexcept-swap)
|
||||
void swap(vec& other) noexcept(std::is_nothrow_swappable_v<T>) {
|
||||
for ( std::size_t i = 0; i < Size; ++i ) {
|
||||
using std::swap;
|
||||
@@ -268,6 +269,7 @@ namespace vmath_hpp
|
||||
// swap
|
||||
|
||||
template < typename T, std::size_t Size >
|
||||
// NOLINTNEXTLINE(*-noexcept-swap)
|
||||
void swap(vec<T, Size>& l, vec<T, Size>& r) noexcept(noexcept(l.swap(r))) {
|
||||
l.swap(r);
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace vmath_hpp::detail::impl
|
||||
template < typename A, std::size_t Size, typename F, std::size_t... Is >
|
||||
[[nodiscard]] constexpr VMATH_HPP_FORCE_INLINE
|
||||
auto map_join_impl(
|
||||
F&& f,
|
||||
F&& f, // NOLINT(*-missing-std-forward)
|
||||
const vec<A, Size>& a,
|
||||
std::index_sequence<Is...>)
|
||||
{
|
||||
@@ -26,7 +26,7 @@ namespace vmath_hpp::detail::impl
|
||||
template < typename A, typename B, std::size_t Size, typename F, std::size_t... Is >
|
||||
[[nodiscard]] constexpr VMATH_HPP_FORCE_INLINE
|
||||
auto map_join_impl(
|
||||
F&& f,
|
||||
F&& f, // NOLINT(*-missing-std-forward)
|
||||
const vec<A, Size>& a,
|
||||
const vec<B, Size>& b,
|
||||
std::index_sequence<Is...>)
|
||||
@@ -37,7 +37,7 @@ namespace vmath_hpp::detail::impl
|
||||
template < typename A, typename B, typename C, std::size_t Size, typename F, std::size_t... Is >
|
||||
[[nodiscard]] constexpr VMATH_HPP_FORCE_INLINE
|
||||
auto map_join_impl(
|
||||
F&& f,
|
||||
F&& f, // NOLINT(*-missing-std-forward)
|
||||
const vec<A, Size>& a,
|
||||
const vec<B, Size>& b,
|
||||
const vec<C, Size>& c,
|
||||
@@ -49,7 +49,7 @@ namespace vmath_hpp::detail::impl
|
||||
template < typename A, typename B, typename C, typename D, std::size_t Size, typename F, std::size_t... Is >
|
||||
[[nodiscard]] constexpr VMATH_HPP_FORCE_INLINE
|
||||
auto map_join_impl(
|
||||
F&& f,
|
||||
F&& f, // NOLINT(*-missing-std-forward)
|
||||
const vec<A, Size>& a,
|
||||
const vec<B, Size>& b,
|
||||
const vec<C, Size>& c,
|
||||
@@ -62,7 +62,7 @@ namespace vmath_hpp::detail::impl
|
||||
template < typename A, typename B, std::size_t Size, typename F, std::size_t... Is >
|
||||
[[nodiscard]] constexpr VMATH_HPP_FORCE_INLINE
|
||||
auto fold_join_impl(
|
||||
F&& f,
|
||||
F&& f, // NOLINT(*-missing-std-forward)
|
||||
A init,
|
||||
const vec<B, Size>& b,
|
||||
std::index_sequence<Is...>)
|
||||
@@ -73,7 +73,7 @@ namespace vmath_hpp::detail::impl
|
||||
template < typename A, std::size_t Size, typename F, std::size_t I, std::size_t... Is >
|
||||
[[nodiscard]] constexpr VMATH_HPP_FORCE_INLINE
|
||||
auto fold1_join_impl(
|
||||
F&& f,
|
||||
F&& f, // NOLINT(*-missing-std-forward)
|
||||
const vec<A, Size>& a,
|
||||
std::index_sequence<I, Is...>)
|
||||
{
|
||||
@@ -84,7 +84,7 @@ namespace vmath_hpp::detail::impl
|
||||
template < typename A, std::size_t Size, typename F, std::size_t... Is >
|
||||
[[nodiscard]] constexpr VMATH_HPP_FORCE_INLINE
|
||||
auto fold1_and_join_impl(
|
||||
F&& f,
|
||||
F&& f, // NOLINT(*-missing-std-forward)
|
||||
const vec<A, Size>& a,
|
||||
std::index_sequence<Is...>)
|
||||
{
|
||||
@@ -94,7 +94,7 @@ namespace vmath_hpp::detail::impl
|
||||
template < typename A, typename B, std::size_t Size, typename F, std::size_t... Is >
|
||||
[[nodiscard]] constexpr VMATH_HPP_FORCE_INLINE
|
||||
auto fold1_and_join_impl(
|
||||
F&& f,
|
||||
F&& f, // NOLINT(*-missing-std-forward)
|
||||
const vec<A, Size>& a,
|
||||
const vec<B, Size>& b,
|
||||
std::index_sequence<Is...>)
|
||||
@@ -105,7 +105,7 @@ namespace vmath_hpp::detail::impl
|
||||
template < typename A, std::size_t Size, typename F, std::size_t... Is >
|
||||
[[nodiscard]] constexpr VMATH_HPP_FORCE_INLINE
|
||||
auto fold1_or_join_impl(
|
||||
F&& f,
|
||||
F&& f, // NOLINT(*-missing-std-forward)
|
||||
const vec<A, Size>& a,
|
||||
std::index_sequence<Is...>)
|
||||
{
|
||||
@@ -115,7 +115,7 @@ namespace vmath_hpp::detail::impl
|
||||
template < typename A, typename B, std::size_t Size, typename F, std::size_t... Is >
|
||||
[[nodiscard]] constexpr VMATH_HPP_FORCE_INLINE
|
||||
auto fold1_or_join_impl(
|
||||
F&& f,
|
||||
F&& f, // NOLINT(*-missing-std-forward)
|
||||
const vec<A, Size>& a,
|
||||
const vec<B, Size>& b,
|
||||
std::index_sequence<Is...>)
|
||||
@@ -126,7 +126,7 @@ namespace vmath_hpp::detail::impl
|
||||
template < typename A, typename B, std::size_t Size, typename F, std::size_t... Is >
|
||||
[[nodiscard]] constexpr VMATH_HPP_FORCE_INLINE
|
||||
auto fold1_plus_join_impl(
|
||||
F&& f,
|
||||
F&& f, // NOLINT(*-missing-std-forward)
|
||||
const vec<A, Size>& a,
|
||||
const vec<B, Size>& b,
|
||||
std::index_sequence<Is...>)
|
||||
|
||||
Reference in New Issue
Block a user