diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2022-11-12 18:59:21 -1000 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2022-11-12 18:59:21 -1000 |
commit | 4349cb6165e983ff6bdd45ad1b82bb98bfc0436f (patch) | |
tree | eeb39af41808a4846a16a558118a4b929abe71bb /indra/newview/lltexturefetch.h | |
parent | cd997f21c272987e954f5890ed14fcc327eb734e (diff) |
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.
Diffstat (limited to 'indra/newview/lltexturefetch.h')
-rw-r--r-- | indra/newview/lltexturefetch.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/indra/newview/lltexturefetch.h b/indra/newview/lltexturefetch.h index bf6732963f..e2d2aa365c 100644 --- a/indra/newview/lltexturefetch.h +++ b/indra/newview/lltexturefetch.h @@ -65,7 +65,7 @@ public: class TFRequest; // Threads: Tmain - /*virtual*/ S32 update(F32 max_time_ms); + /*virtual*/ size_t update(F32 max_time_ms); // called in the main thread after the TextureCacheThread shuts down. // Threads: Tmain @@ -137,7 +137,7 @@ public: U32 getTotalNumHTTPRequests(); // Threads: T* - S32 getPending(); + size_t getPending(); // Threads: T* void lockQueue() { mQueueMutex.lock(); } |