From 6ec534e8d89462e42629b953dcfb545d00defa64 Mon Sep 17 00:00:00 2001 From: Brad Kittenbrink Date: Fri, 11 Nov 2022 15:31:46 -0800 Subject: DRTVWR-575 xcode-14.1 compatibility fix. add overloads for stricter integer conversions --- indra/llcommon/llsd.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra') diff --git a/indra/llcommon/llsd.h b/indra/llcommon/llsd.h index f034470da7..09aac47d0d 100644 --- a/indra/llcommon/llsd.h +++ b/indra/llcommon/llsd.h @@ -320,6 +320,8 @@ public: // overload to disambiguate [0], [1] et al. const LLSD& operator[](Integer i) const { return (*this)[size_t(i)]; } LLSD& operator[](Integer i) { return (*this)[size_t(i)]; } + const LLSD& operator[](U32 i) const { return (*this)[size_t(i)]; } + LLSD& operator[](U32 i) { return (*this)[size_t(i)]; } //@} /** @name Iterators */ -- cgit v1.2.3 From 6bc0614d717166e1e587012c3388445d662775a3 Mon Sep 17 00:00:00 2001 From: Brad Kittenbrink Date: Fri, 11 Nov 2022 16:35:51 -0800 Subject: DRTVWR-575 xcode-14.1 compatibility fix. add more overloads for stricter size_t conversions --- indra/llcommon/llsd.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra') diff --git a/indra/llcommon/llsd.h b/indra/llcommon/llsd.h index 09aac47d0d..dfdf71d6a9 100644 --- a/indra/llcommon/llsd.h +++ b/indra/llcommon/llsd.h @@ -208,6 +208,7 @@ public: LLSD& operator=(Boolean v) { assign(v); return *this; } LLSD& operator=(Integer v) { assign(v); return *this; } + LLSD& operator=(size_t v) { assign(Integer(v)); return *this; } LLSD& operator=(Real v) { assign(v); return *this; } LLSD& operator=(const String& v) { assign(v); return *this; } LLSD& operator=(const UUID& v) { assign(v); return *this; } -- cgit v1.2.3 From 22f6adefb892ab83168e6236e2453b62314d0db6 Mon Sep 17 00:00:00 2001 From: Brad Kittenbrink Date: Fri, 11 Nov 2022 17:07:52 -0800 Subject: DRTVWR-575 fix LLWorkerThread subclasses to be compatiblie with recent size_t changes in base class --- indra/newview/lltexturecache.cpp | 4 ++-- indra/newview/lltexturecache.h | 2 +- indra/newview/lltexturefetch.cpp | 8 ++++---- indra/newview/lltexturefetch.h | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) (limited to 'indra') diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index 9403e73b87..67da311493 100644 --- a/indra/newview/lltexturecache.cpp +++ b/indra/newview/lltexturecache.cpp @@ -859,12 +859,12 @@ LLTextureCache::~LLTextureCache() ////////////////////////////////////////////////////////////////////////////// //virtual -S32 LLTextureCache::update(F32 max_time_ms) +size_t LLTextureCache::update(F32 max_time_ms) { static LLFrameTimer timer ; static const F32 MAX_TIME_INTERVAL = 300.f ; //seconds. - S32 res; + size_t res; res = LLWorkerThread::update(max_time_ms); mListMutex.lock(); diff --git a/indra/newview/lltexturecache.h b/indra/newview/lltexturecache.h index e1c752b58e..b6ace467c7 100644 --- a/indra/newview/lltexturecache.h +++ b/indra/newview/lltexturecache.h @@ -113,7 +113,7 @@ public: LLTextureCache(bool threaded); ~LLTextureCache(); - /*virtual*/ S32 update(F32 max_time_ms); + /*virtual*/ size_t update(F32 max_time_ms); void purgeCache(ELLPath location, bool remove_dir = true); void setReadOnly(BOOL read_only) ; diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 0edaf40c66..8923f53cf5 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -3104,9 +3104,9 @@ bool LLTextureFetch::updateRequestPriority(const LLUUID& id, F32 priority) // Threads: T* //virtual -S32 LLTextureFetch::getPending() +size_t LLTextureFetch::getPending() { - S32 res; + size_t res; lockData(); // +Ct { LLMutexLock lock(&mQueueMutex); // +Mfq @@ -3181,7 +3181,7 @@ void LLTextureFetch::commonUpdate() // Threads: Tmain //virtual -S32 LLTextureFetch::update(F32 max_time_ms) +size_t LLTextureFetch::update(F32 max_time_ms) { static LLCachedControl band_width(gSavedSettings,"ThrottleBandwidthKBPS", 3000.0); @@ -3195,7 +3195,7 @@ S32 LLTextureFetch::update(F32 max_time_ms) mNetworkQueueMutex.unlock(); // -Mfnq } - S32 res = LLWorkerThread::update(max_time_ms); + size_t res = LLWorkerThread::update(max_time_ms); if (!mDebugPause) { 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(); } -- cgit v1.2.3 From 076737cb6c28e9e5ea47cd4cb6ea9c5c514e578b Mon Sep 17 00:00:00 2001 From: Brad Kittenbrink Date: Fri, 11 Nov 2022 18:09:23 -0800 Subject: DRTVWR-575 fix LLGetDarwinOSInfo for xcode-14.1. NSInteger is now 64 bits --- indra/llcommon/llsys.cpp | 2 +- indra/llcommon/llsys_objc.h | 4 +++- indra/llcommon/llsys_objc.mm | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'indra') diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp index 1951ca6843..f52433af40 100644 --- a/indra/llcommon/llsys.cpp +++ b/indra/llcommon/llsys.cpp @@ -273,7 +273,7 @@ LLOSInfo::LLOSInfo() : { const char * DARWIN_PRODUCT_NAME = "Mac OS X"; - S32 major_version, minor_version, bugfix_version = 0; + int64_t major_version, minor_version, bugfix_version = 0; if (LLGetDarwinOSInfo(major_version, minor_version, bugfix_version)) { diff --git a/indra/llcommon/llsys_objc.h b/indra/llcommon/llsys_objc.h index 35599a574b..aebc600032 100644 --- a/indra/llcommon/llsys_objc.h +++ b/indra/llcommon/llsys_objc.h @@ -27,7 +27,9 @@ #ifndef LL_LLSYS_OBJC_H #define LL_LLSYS_OBJC_H -bool LLGetDarwinOSInfo(int &major, int &minor, int &patch); +#include + +bool LLGetDarwinOSInfo(int64_t &major, int64_t &minor, int64_t &patch); #endif // LL_LLSYS_OBJC_H diff --git a/indra/llcommon/llsys_objc.mm b/indra/llcommon/llsys_objc.mm index 9359503a19..ccd39a2d46 100644 --- a/indra/llcommon/llsys_objc.mm +++ b/indra/llcommon/llsys_objc.mm @@ -32,7 +32,7 @@ static NSInteger intAtStringIndex(NSArray *array, int index) return [(NSString *)[array objectAtIndex:index] integerValue]; } -bool LLGetDarwinOSInfo(NSInteger &major, NSInteger &minor, NSInteger &patch) +bool LLGetDarwinOSInfo(int64_t &major, int64_t &minor, int64_t &patch) { if (NSAppKitVersionNumber > NSAppKitVersionNumber10_8) { -- cgit v1.2.3