diff options
Diffstat (limited to 'games/openmw/files')
3 files changed, 70 insertions, 12 deletions
diff --git a/games/openmw/files/patch-components_crashcatcher_crashcatcher.cpp b/games/openmw/files/patch-components_crashcatcher_crashcatcher.cpp index 7d1fc2f20462..9a6941316d2b 100644 --- a/games/openmw/files/patch-components_crashcatcher_crashcatcher.cpp +++ b/games/openmw/files/patch-components_crashcatcher_crashcatcher.cpp @@ -1,29 +1,42 @@ --- components/crashcatcher/crashcatcher.cpp.orig 2025-07-01 11:41:15 UTC +++ components/crashcatcher/crashcatcher.cpp -@@ -95,6 +95,8 @@ namespace - { ILL_PRVREG, "Privileged register" }, +@@ -83,6 +83,7 @@ namespace + { SIGFPE, "FPU exception", "SIGFPE" }, + { SIGBUS, "System BUS error", "SIGBUS" }, + { SIGABRT, "Abnormal termination condition", "SIGABRT" }, ++ { 0, nullptr }, + }; + + constexpr SignalInfo sigIllCodes[] = { +@@ -96,6 +97,7 @@ namespace { ILL_COPROC, "Coprocessor error" }, { ILL_BADSTK, "Internal stack error" }, -+#else -+ { 0, nullptr }, #endif ++ { 0, nullptr }, + }; + + constexpr SignalInfo sigFpeCodes[] = { +@@ -107,6 +109,7 @@ namespace + { FPE_FLTRES, "Floating point inexact result" }, + { FPE_FLTINV, "Floating point invalid operation" }, + { FPE_FLTSUB, "Subscript out of range" }, ++ { 0, nullptr }, }; -@@ -113,6 +115,8 @@ namespace - #ifndef __FreeBSD__ + constexpr SignalInfo sigSegvCodes[] = { +@@ -114,6 +117,7 @@ namespace { SEGV_MAPERR, "Address not mapped to object" }, { SEGV_ACCERR, "Invalid permissions for mapped object" }, -+#else -+ { 0, nullptr }, #endif ++ { 0, nullptr }, }; -@@ -121,6 +125,8 @@ namespace - { BUS_ADRALN, "Invalid address alignment" }, + constexpr SignalInfo sigBusCodes[] = { +@@ -122,6 +126,7 @@ namespace { BUS_ADRERR, "Non-existent physical address" }, { BUS_OBJERR, "Object specific hardware error" }, -+#else -+ { 0, nullptr }, #endif ++ { 0, nullptr }, }; + const char* findSignalDescription(std::span<const SignalInfo> info, int code) diff --git a/games/openmw/files/patch-components_esm_formid.hpp b/games/openmw/files/patch-components_esm_formid.hpp new file mode 100644 index 000000000000..44f943fea077 --- /dev/null +++ b/games/openmw/files/patch-components_esm_formid.hpp @@ -0,0 +1,17 @@ +--- components/esm/formid.hpp.orig 2025-07-01 11:41:15 UTC ++++ components/esm/formid.hpp +@@ -51,10 +51,10 @@ namespace std + { + size_t operator()(const ESM::FormId& formId) const + { +- static_assert(sizeof(ESM::FormId) == sizeof(size_t)); +- size_t s; +- memcpy(&s, &formId, sizeof(size_t)); +- return hash<size_t>()(s); ++ static_assert(sizeof(ESM::FormId) == sizeof(uint64_t)); ++ uint64_t s; ++ memcpy(&s, &formId, sizeof(ESM::FormId)); ++ return hash<uint64_t>()(s); + } + }; + diff --git a/games/openmw/files/patch-components_misc_strings_algorithm.hpp b/games/openmw/files/patch-components_misc_strings_algorithm.hpp new file mode 100644 index 000000000000..c7aa3b1ecfeb --- /dev/null +++ b/games/openmw/files/patch-components_misc_strings_algorithm.hpp @@ -0,0 +1,28 @@ +--- components/misc/strings/algorithm.hpp.orig 2025-07-01 11:41:15 UTC ++++ components/misc/strings/algorithm.hpp +@@ -4,6 +4,7 @@ + #include "lower.hpp" + + #include <algorithm> ++#include <cstdint> + #include <functional> + #include <string> + #include <string_view> +@@ -88,14 +89,14 @@ namespace Misc::StringUtils + constexpr std::size_t operator()(std::string_view str) const + { + // FNV-1a +- std::size_t hash{ 0xcbf29ce484222325ull }; +- constexpr std::size_t prime{ 0x00000100000001B3ull }; ++ std::uint64_t hash{ 0xcbf29ce484222325ull }; ++ constexpr std::uint64_t prime{ 0x00000100000001B3ull }; + for (char c : str) + { +- hash ^= static_cast<std::size_t>(toLower(c)); ++ hash ^= static_cast<std::uint64_t>(toLower(c)); + hash *= prime; + } +- return hash; ++ return static_cast<std::size_t>(hash); + } + }; |