Compare commits

..

5 Commits

Author SHA1 Message Date
gary ef1c108b58 [ox/std] Address GCC finding a new way to be retarded
Build / build (push) Successful in 1m12s
2026-05-19 23:19:50 -05:00
gary 6a054cd970 [nostalgia] Enable Wayland support for GLFW
Build / build (push) Successful in 1m39s
2026-05-19 22:47:02 -05:00
gary 9070e6e109 [ox/std] Fix compiler warning
Build / build (push) Successful in 1m18s
2026-05-17 20:33:58 -05:00
gary 6cc6e9e7ed [studio] Rename caseInsensitiveEquals to caseInsensitiveStrCmp
Build / build (push) Successful in 1m9s
2026-05-17 15:56:14 -05:00
gary de859bef77 [ox/std] Rename caseInsensitiveEquals to caseInsensitiveStrCmp 2026-05-17 15:55:35 -05:00
4 changed files with 13 additions and 6 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.19)
cmake_minimum_required(VERSION 3.25)
set(CMAKE_POLICY_DEFAULT_CMP0110 NEW) # requires CMake 3.19
if(BUILDCORE_TARGET STREQUAL "gba")
@@ -52,7 +52,7 @@ if(NOT BUILDCORE_TARGET STREQUAL "gba")
set(GLFW_BUILD_TESTS OFF)
set(GLFW_BUILD_DOCS OFF)
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
set(GLFW_BUILD_WAYLAND OFF)
set(GLFW_BUILD_WAYLAND ON)
endif()
add_subdirectory(deps/glfw)
add_subdirectory(deps/glutils)
+2 -2
View File
@@ -38,11 +38,11 @@ constexpr StringView substr(StringViewCR str, std::size_t const start, std::size
[[nodiscard]]
constexpr char toUpper(char const c) noexcept {
return c & 0b1101'1111;
return c & static_cast<char>(0b1101'1111);
}
[[nodiscard]]
constexpr int caseInsensitiveEquals(ox::StringViewCR a, ox::StringViewCR b) noexcept {
constexpr int caseInsensitiveStrCmp(StringViewCR a, StringViewCR b) noexcept {
auto const sz = ox::min(a.size(), b.size());
for (size_t i{}; i < sz; ++i) {
auto const ac = toUpper(a[i]);
+7
View File
@@ -54,6 +54,10 @@ struct VectorAllocator {
// this totally idiotic redundant check (&& count <= Size) is required to address a bug in devkitARM,
// try removing it later
if (!std::is_constant_evaluated()) {
#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstringop-overflow="
#endif
if (cap <= m_data.size() && count <= m_data.size()) {
for (auto i = 0u; i < count; ++i) {
auto const srcItem = std::launder(reinterpret_cast<T*>(&src->m_data[i]));
@@ -65,6 +69,9 @@ struct VectorAllocator {
*items = reinterpret_cast<T*>(m_data.data());
}
}
#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic pop
#endif
}
}
@@ -36,9 +36,9 @@ static void printUsage() noexcept {
[[nodiscard]]
static constexpr ox::Result<ox::ClawFormat> getFmt(ox::StringViewCR fmtStr) noexcept {
if (caseInsensitiveEquals(fmtStr, "mc") == 0) {
if (caseInsensitiveStrCmp(fmtStr, "mc") == 0) {
return ox::ClawFormat::Metal;
} else if (caseInsensitiveEquals(fmtStr, "oc") == 0) {
} else if (caseInsensitiveStrCmp(fmtStr, "oc") == 0) {
return ox::ClawFormat::Organic;
}
return ox::Error{1, "invalid format"};