[ox/std] Cleanup
This commit is contained in:
parent
be1f90955b
commit
43e2e2155b
6
deps/ox/src/ox/std/math.hpp
vendored
6
deps/ox/src/ox/std/math.hpp
vendored
@ -48,11 +48,11 @@ constexpr const T &clamp(const T &v, const T &lo, const T &hi) noexcept requires
|
|||||||
return min(ox::max(v, lo), hi);
|
return min(ox::max(v, lo), hi);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename I>
|
template<typename I, typename E>
|
||||||
[[nodiscard]]
|
[[nodiscard]]
|
||||||
constexpr I pow(I v, int e) noexcept {
|
constexpr I pow(I v, E e) noexcept {
|
||||||
I out = 1;
|
I out = 1;
|
||||||
for (I i = 0; i < e; i++) {
|
for (E i = 0; i < e; ++i) {
|
||||||
out *= v;
|
out *= v;
|
||||||
}
|
}
|
||||||
return out;
|
return out;
|
||||||
|
5
deps/ox/src/ox/std/stringliteral.hpp
vendored
5
deps/ox/src/ox/std/stringliteral.hpp
vendored
@ -32,10 +32,9 @@ class StringLiteral: public detail::BaseStringView {
|
|||||||
|
|
||||||
constexpr explicit StringLiteral(const char *str, std::size_t len) noexcept: BaseStringView(str, len) {}
|
constexpr explicit StringLiteral(const char *str, std::size_t len) noexcept: BaseStringView(str, len) {}
|
||||||
|
|
||||||
constexpr explicit StringLiteral(char const *str) noexcept: StringLiteral(str, ox::strlen(str)) {
|
constexpr explicit StringLiteral(char const *str) noexcept: StringLiteral(str, ox::strlen(str)) {}
|
||||||
}
|
|
||||||
|
|
||||||
constexpr auto &operator=(StringLiteral const&other) noexcept {
|
constexpr StringLiteral &operator=(StringLiteral const&other) noexcept {
|
||||||
if (&other != this) {
|
if (&other != this) {
|
||||||
set(other.data(), other.len());
|
set(other.data(), other.len());
|
||||||
}
|
}
|
||||||
|
4
deps/ox/src/ox/std/utility.hpp
vendored
4
deps/ox/src/ox/std/utility.hpp
vendored
@ -16,8 +16,8 @@
|
|||||||
namespace std {
|
namespace std {
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
constexpr typename ox::remove_reference<T>::type &&move(T &&t) noexcept {
|
constexpr ox::remove_reference_t<T> &&move(T &&t) noexcept {
|
||||||
return static_cast<typename ox::remove_reference<T>::type&&>(t);
|
return static_cast<ox::remove_reference_t<T>&&>(t);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user