Compare commits

..

3 Commits

Author SHA1 Message Date
0a3a3cb84c [jasper/project] Add new type descriptors
All checks were successful
Build / build (push) Successful in 1m28s
2025-05-23 00:53:44 -05:00
62e4212323 Merge commit 'b32061bd92ed073ea8677cbe98411ad8acf41adb'
All checks were successful
Build / build (push) Successful in 1m29s
2025-05-23 00:51:42 -05:00
b32061bd92 Squashed 'deps/nostalgia/' changes from cb304ecf..27cce3ec
27cce3ec [ox/std] Fix implementation of std cmp functions
a40198ab [nostalgia] Update release-d2025.05.2 release notes
52d8c0bd [nostalgia/gfx] Replace static_cast compare with std::cmp_equal
c19d7f4e [nostalgia] Add .vs and cmake-build-* to .gitignore
159b7e7e [buildcore] Make pybb cmake_build specify --config debug/release
c93eec4f [teagba] Make cstart.cpp only compile if GCC
e7e7a223 [nostalgia/sample_project] Make sample_project exempt from autocrlf
26d5048e [ox/fs] Fix new build error in MSVC (VS 17.14)
3b8f97cc [nostalgia/gfx] Cleanup
f1e68e0a [nostalgia/gfx/studio/tilesheet] Fix overrun errors when switching subsheets, clear selection on switch
d6e4ab7a [keel] Cleanup

git-subtree-dir: deps/nostalgia
git-subtree-split: 27cce3eca68e441fb27c87cada012a1eb773596e
2025-05-23 00:51:42 -05:00

View File

@@ -43,7 +43,7 @@ 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 t < 0 || static_cast<ox::Unsigned<T>>(t) < u;
return t >= 0 && static_cast<ox::Unsigned<T>>(t) < u;
} else {
return u >= 0 && t < static_cast<ox::Unsigned<U>>(u);
}
@@ -69,13 +69,6 @@ constexpr bool cmp_greater_equal(T const t, U const u) noexcept {
return !std::cmp_less(t, u);
}
static_assert(cmp_less(-1, 5u));
static_assert(!cmp_less(5u, -1));
static_assert(cmp_equal(5u, 5));
static_assert(cmp_equal(5, 5u));
static_assert(!cmp_equal(-5, 5u));
static_assert(!cmp_equal(4u, 5u));
}
#endif