fix little nodiscard issues

This commit is contained in:
BlackMATov
2021-02-13 14:35:26 +07:00
parent b6c763d19d
commit 75ed7abd36
3 changed files with 3 additions and 3 deletions

View File

@@ -406,7 +406,7 @@ public:
constexpr explicit operator vec<T, 4>() const;
void swap(qua& other) noexcept(std::is_nothrow_swappable_v<T>);
void swap(qua& other) noexcept(is_nothrow_swappable_v<T>);
iterator begin() noexcept;
const_iterator begin() const noexcept;

View File

@@ -281,7 +281,7 @@ namespace vmath_hpp
}
template < typename T >
[[nodiscard]] std::enable_if_t<std::is_floating_point_v<T>, void>
std::enable_if_t<std::is_floating_point_v<T>, void>
sincos(T x, T* s, T* c) noexcept {
*s = sin(x);
*c = cos(x);

View File

@@ -806,7 +806,7 @@ namespace vmath_hpp
}
template < typename T, std::size_t Size >
std::pair<vec<T, Size>, vec<T, Size>> sincos(const vec<T, Size>& xs) {
[[nodiscard]] std::pair<vec<T, Size>, vec<T, Size>> sincos(const vec<T, Size>& xs) {
return { sin(xs), cos(xs) };
}