mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-24 00:42:32 +00:00
Pass uint64_t literal to std::max
On 32-bit system, uint64_t is typedef to unsigned long long. On 64-bit system, uint64_t is typedef to unsigned long. unsigned long and unsigned long long are distinctly separate types, which causes std::max template to fail.
This commit is contained in:
parent
4a7463d134
commit
d2569dc3af
1 changed files with 2 additions and 1 deletions
|
|
@ -271,7 +271,8 @@ public:
|
|||
gain_ = from;
|
||||
gain_target_ = to;
|
||||
// Gain samples target must always be at least 1 to avoid a div-by-zero.
|
||||
gain_samples_target_ = std::max(static_cast<uint64_t>(seconds * 44100.f), 1ULL);
|
||||
gain_samples_target_ = std::max(
|
||||
static_cast<uint64_t>(seconds * 44100.f), UINT64_C(1)); // UINT64_C generates a uint64_t literal
|
||||
gain_samples_ = 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue