Squashed 'deps/nostalgia/' changes from 804d78e1..2a8e3c2d
2a8e3c2d [nostalgia/gfx] Remove unnecessary cast 998066d3 [ox/std] Add comparison functions fefb876f [nostalgia/gfx] Add checks for GCC version for warning suppression 5979e988 [jsoncpp] Up required CMake version a17abe46 [nfde] Up required CMake version d62f9138 [nostalgia/gfx] Suppress some superfluous warnings 12bb7475 [nostalgia/gfx/studio/tilesheet] Adjust pixel line size on Windows df2c7e2b [nostalgia] Update release notes 713aec88 [buildcore] Change mypy invokation 3089cd7a Change builder type to olympic 00638bc8 [nostalgia/gfx/studio/tilesheet] Mark DrawCommands as obsolete if no changes e0021098 [studio] Make undo/redo skip over obsolete commands b4798fd2 [nostalgia/gfx/studio/tilesheet] Make rotate only available for square subsheets or selections 3c804bf6 [studio] Give MakeCopy popup an error message for files that already exist d39d552b [nostalgia/studio] Update icon to higher resolution b7202a2b [nostalgia/player] Disable Keel mods on GBA 4e27a4c1 [nostalgia/core/studio/tilesheet] Fix palette path display update 4ef31762 [nostalgia/core/studio/tilesheet] Cleanup 8b22a8f3 [keel] Make buildUuidMap only read the first 40 bytes of each file d45ff05b [ox/fs] Add new partial file read functions 671dd862 [keel,studio] Add Make Copy option to ProjectExplorer 0abadc18 [studio] Fix QuestionPopup to only emit a response when there is a response 4e068d62 [studio] Fix misrender flash on tab close 4461f99f [studio] Add Ctrl-W shortcut for closing active tab cd1f4bda [studio] Add confirmation for closing file with unsaved changes 47286995 [studio] Add combobox that will take string views 105a1e55 [nostalgia/core/studio/tilesheet] Rework operation ctrls into a dropbox 1bc18e34 [nostalgia/core/studio/tilesheet] Add ability to rotate a selection fb8d295f [nostalgia/core/studio/tilesheet] Add rotate functionality git-subtree-dir: deps/nostalgia git-subtree-split: 2a8e3c2dc44642fd9fef6bc8b645ad966f0277da
This commit is contained in:
42
deps/ox/src/ox/std/utility.hpp
vendored
42
deps/ox/src/ox/std/utility.hpp
vendored
@@ -27,6 +27,48 @@ constexpr void swap(T &a, T &b) noexcept {
|
||||
b = std::move(temp);
|
||||
}
|
||||
|
||||
template<typename T, typename U>
|
||||
constexpr bool cmp_equal(T const t, U const u) noexcept {
|
||||
if constexpr(ox::is_signed_v<T> == ox::is_signed_v<U>) {
|
||||
return t == u;
|
||||
} else if constexpr(ox::is_signed_v<T>) {
|
||||
return ox::Signed<T>{t} == u;
|
||||
} else {
|
||||
return t == ox::Signed<U>{u};
|
||||
}
|
||||
}
|
||||
|
||||
template<typename T, typename U>
|
||||
constexpr bool cmp_less(T const t, U const u) noexcept {
|
||||
if constexpr(ox::is_signed_v<T> == ox::is_signed_v<U>) {
|
||||
return t < u;
|
||||
} else if constexpr(ox::is_signed_v<T>) {
|
||||
return ox::Signed<T>{t} < u;
|
||||
} else {
|
||||
return t < ox::Signed<U>{u};
|
||||
}
|
||||
}
|
||||
|
||||
template<typename T, typename U>
|
||||
constexpr bool cmp_not_equal(T const t, U const u) noexcept {
|
||||
return !std::cmp_equal(t, u);
|
||||
}
|
||||
|
||||
template<typename T, typename U>
|
||||
constexpr bool cmp_greater(T const t, U const u) noexcept {
|
||||
return std::cmp_less(u, t);
|
||||
}
|
||||
|
||||
template<typename T, typename U>
|
||||
constexpr bool cmp_less_equal(T const t, U const u) noexcept {
|
||||
return !std::cmp_less(u, t);
|
||||
}
|
||||
|
||||
template<typename T, typename U>
|
||||
constexpr bool cmp_greater_equal(T const t, U const u) noexcept {
|
||||
return !std::cmp_less(t, u);
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user