[*] Re-fix clang-cl building (#3940)
Some checks are pending
tx-src / sources (push) Waiting to run
Check Strings / check-strings (push) Waiting to run

Signed-off-by: lizzie <lizzie@eden-emu.dev>
Co-authored-by: crueter <crueter@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3940
Reviewed-by: crueter <crueter@eden-emu.dev>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
This commit is contained in:
lizzie 2026-05-09 16:26:17 +02:00 committed by crueter
parent cad9db4886
commit 86f2f0bc36
No known key found for this signature in database
GPG key ID: 425ACD2D4830EBC6
8 changed files with 48 additions and 36 deletions

View file

@ -1259,7 +1259,7 @@ class ParameterPack final : public Node {
// Setup OutputBuffer for a pack expansion, unless we're already expanding
// one.
void initializePackExpansion(OutputBuffer &OB) const {
if (OB.CurrentPackMax == std::numeric_limits<unsigned>::max()) {
if (OB.CurrentPackMax == (std::numeric_limits<unsigned>::max)()) {
OB.CurrentPackMax = static_cast<unsigned>(Data.size());
OB.CurrentPackIndex = 0;
}
@ -1353,7 +1353,7 @@ public:
const Node *getChild() const { return Child; }
void printLeft(OutputBuffer &OB) const override {
constexpr unsigned Max = std::numeric_limits<unsigned>::max();
constexpr unsigned Max = (std::numeric_limits<unsigned>::max)();
ScopedOverride<unsigned> SavePackIdx(OB.CurrentPackIndex, Max);
ScopedOverride<unsigned> SavePackMax(OB.CurrentPackMax, Max);
size_t StreamPos = OB.getCurrentPosition();

View file

@ -88,8 +88,8 @@ public:
/// If a ParameterPackExpansion (or similar type) is encountered, the offset
/// into the pack that we're currently printing.
unsigned CurrentPackIndex = std::numeric_limits<unsigned>::max();
unsigned CurrentPackMax = std::numeric_limits<unsigned>::max();
unsigned CurrentPackIndex = (std::numeric_limits<unsigned>::max)();
unsigned CurrentPackMax = (std::numeric_limits<unsigned>::max)();
/// When zero, we're printing template args and '>' needs to be parenthesized.
/// Use a counter so we can simply increment inside parentheses.

View file

@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-FileCopyrightText: 1996 Arthur David Olson
// SPDX-License-Identifier: BSD-2-Clause
@ -466,8 +469,8 @@ CalendarTimeInternal* timesub(const time_t* timep, s64 offset, const Rule* sp,
int signed_y = static_cast<s32>(y);
tmp->tm_year = signed_y - TM_YEAR_BASE;
}
else if ((!std::is_signed_v<time_t> || std::numeric_limits<s32>::min() + TM_YEAR_BASE <= y) &&
y - TM_YEAR_BASE <= std::numeric_limits<s32>::max()) {
else if ((!std::is_signed_v<time_t> || (std::numeric_limits<s32>::min)() + TM_YEAR_BASE <= y) &&
y - TM_YEAR_BASE <= (std::numeric_limits<s32>::max)()) {
tmp->tm_year = static_cast<s32>(y - TM_YEAR_BASE);
}
else {
@ -558,8 +561,8 @@ CalendarTimeInternal* localsub(Rule const* sp, time_t const* timep, s64 setname,
else {
newy += years;
}
if (!(std::numeric_limits<s32>::min() <= newy &&
newy <= std::numeric_limits<s32>::max())) {
if (!((std::numeric_limits<s32>::min)() <= newy &&
newy <= (std::numeric_limits<s32>::max)())) {
return nullptr;
}
result->tm_year = static_cast<s32>(newy);

11
externals/tz/tz/tz.h vendored
View file

@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-FileCopyrightText: 1996 Arthur David Olson
// SPDX-License-Identifier: BSD-2-Clause
@ -26,10 +29,10 @@ constexpr size_t TZ_MAX_CHARS = 50;
constexpr size_t MY_TZNAME_MAX = 255;
constexpr size_t TZNAME_MAXIMUM = 255;
constexpr size_t TZ_MAX_LEAPS = 50;
constexpr s64 TIME_T_MAX = std::numeric_limits<s64>::max();
constexpr s64 TIME_T_MIN = std::numeric_limits<s64>::min();
constexpr s64 TIME_T_MAX = (std::numeric_limits<s64>::max)();
constexpr s64 TIME_T_MIN = (std::numeric_limits<s64>::min)();
constexpr size_t CHARS_EXTRA = 3;
constexpr size_t MAX_ZONE_CHARS = std::max(TZ_MAX_CHARS + CHARS_EXTRA, sizeof("UTC"));
constexpr size_t MAX_ZONE_CHARS = (std::max)(TZ_MAX_CHARS + CHARS_EXTRA, sizeof("UTC"));
constexpr size_t MAX_TZNAME_CHARS = 2 * (MY_TZNAME_MAX + 1);
struct ttinfo {
@ -51,7 +54,7 @@ struct Rule {
std::array<s64, TZ_MAX_TIMES> ats;
std::array<u8, TZ_MAX_TIMES> types;
std::array<ttinfo, TZ_MAX_TYPES> ttis;
std::array<char, std::max(MAX_ZONE_CHARS, MAX_TZNAME_CHARS)> chars;
std::array<char, (std::max)(MAX_ZONE_CHARS, MAX_TZNAME_CHARS)> chars;
s32 defaulttype;
std::array <u8, 0x12C4> padding1;
};