Commit Graph

6 Commits (master)

Author SHA1 Message Date
Lars Næsbye Christensen 4a03aa0890 operatingSystemVersion and NSOperatingSystemVersion exis since OS X 10.10, and we require macOS 10.13+ now 2024-01-11 22:12:44 +02:00
Nat Goodspeed 690a5027fb DRTVWR-575: Merge brad's xcode-14.1 fixes with nat's 2022-11-13 05:59:40 -10:00
Nat Goodspeed 4349cb6165 DRTVWR-575: Address review comments on Xcode 14.1 type tweaks.
Introduce LLSD template constructors and assignment operators to disambiguate
construction or assignment from any integer type to Integer, likewise any
floating point type to Real. Use new narrow() function to validate
conversions.

For LLSD method parameters converted from LLSD::Integer to size_t, where the
method previously checked for a negative argument, make it now check for
size_t converted from negative: in other words, more than S32_MAX. The risk of
having a parameter forced from negative to unsigned exceeds the risk of a
valid length or index over that max.

In lltracerecording.cpp's PeriodicRecording, now that mCurPeriod and
mNumRecordedPeriods are size_t instead of S32, defend against subtracting 1
from 0.

Use narrow() to validate newly-introduced narrowing conversions.

Make llclamp() return the type of the raw input value, even if the types of
the boundary values differ.

std::ostream::tellp() no longer returns a value we can directly report as a
number. Cast to U64.
2022-11-12 18:59:21 -10:00
Brad Kittenbrink 076737cb6c DRTVWR-575 fix LLGetDarwinOSInfo for xcode-14.1. NSInteger is now 64 bits 2022-11-11 18:09:23 -08:00
Nat Goodspeed 9522a0b7c1 DRTVWR-575: Fix llcommon assumptions that size_t fits in 4 bytes.
It's a little distressing how often we have historically coded S32 or U32 to
pass a length or index.

There are more such assumptions in other viewer subdirectories, but this is a
start.
2022-11-03 14:58:32 -04:00
Maxim Nikolenko 1167ea994c SL-17634 Replace deprecated carbon Gestalt calls 2022-06-22 18:00:49 +03:00