diff options
author | Ansariel <ansariel.hiller@phoenixviewer.com> | 2024-02-21 21:05:14 +0100 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-02-21 23:14:31 +0200 |
commit | 60d3dd98a44230c21803c1606552ee098ed9fa7c (patch) | |
tree | af0aa11c458ca86f786560e0875f7e018e1a16b9 /indra/newview/lltexturefetch.cpp | |
parent | 855eea7ddf9e1de9226036ca94ccb03ac0e311b9 (diff) |
Convert remaining BOOL to bool
Diffstat (limited to 'indra/newview/lltexturefetch.cpp')
-rw-r--r-- | indra/newview/lltexturefetch.cpp | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 4ecabf666b..7a0da6ec9b 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -392,7 +392,7 @@ public: // Threads: Ttc void callbackCacheRead(bool success, LLImageFormatted* image, - S32 imagesize, BOOL islocal); + S32 imagesize, bool islocal); // Threads: Ttc void callbackCacheWrite(bool success); @@ -571,13 +571,13 @@ private: mCachedSize; e_request_state mSentRequest; handle_t mDecodeHandle; - BOOL mLoaded; - BOOL mDecoded; - BOOL mWritten; - BOOL mNeedsAux; - BOOL mHaveAllData; - BOOL mInLocalCache; - BOOL mInCache; + bool mLoaded; + bool mDecoded; + bool mWritten; + bool mNeedsAux; + bool mHaveAllData; + bool mInLocalCache; + bool mInCache; bool mCanUseHTTP; S32 mRetryAttempt; S32 mActiveCount; @@ -909,15 +909,15 @@ LLTextureFetchWorker::LLTextureFetchWorker(LLTextureFetch* fetcher, mFileSize(0), mSkippedStatesTime(0), mCachedSize(0), - mLoaded(FALSE), + mLoaded(false), mSentRequest(UNSENT), mDecodeHandle(0), - mDecoded(FALSE), - mWritten(FALSE), - mNeedsAux(FALSE), - mHaveAllData(FALSE), - mInLocalCache(FALSE), - mInCache(FALSE), + mDecoded(false), + mWritten(false), + mNeedsAux(false), + mHaveAllData(false), + mInLocalCache(false), + mInCache(false), mCanUseHTTP(true), mRetryAttempt(0), mActiveCount(0), @@ -1054,7 +1054,7 @@ void LLTextureFetchWorker::resetFormattedData() } mHttpReplySize = 0; mHttpReplyOffset = 0; - mHaveAllData = FALSE; + mHaveAllData = false; } F32 LLTextureFetchWorker::getImagePriority() const @@ -1152,10 +1152,10 @@ bool LLTextureFetchWorker::doWork(S32 param) mRequestedOffset = 0; mFileSize = 0; mCachedSize = 0; - mLoaded = FALSE; + mLoaded = false; mSentRequest = UNSENT; - mDecoded = FALSE; - mWritten = FALSE; + mDecoded = false; + mWritten = false; if (mHttpBufferArray) { mHttpBufferArray->release(); @@ -1163,12 +1163,12 @@ bool LLTextureFetchWorker::doWork(S32 param) } mHttpReplySize = 0; mHttpReplyOffset = 0; - mHaveAllData = FALSE; + mHaveAllData = false; clearPackets(); // TODO: Shouldn't be necessary mCacheReadHandle = LLTextureCache::nullHandle(); mCacheWriteHandle = LLTextureCache::nullHandle(); setState(LOAD_FROM_TEXTURE_CACHE); - mInCache = FALSE; + mInCache = false; mDesiredSize = llmax(mDesiredSize, TEXTURE_CACHE_ENTRY_SIZE); // min desired size is TEXTURE_CACHE_ENTRY_SIZE LL_DEBUGS(LOG_TXT) << mID << ": Priority: " << llformat("%8.0f",mImagePriority) << " Desired Discard: " << mDesiredDiscard << " Desired Size: " << mDesiredSize << LL_ENDL; @@ -1190,7 +1190,7 @@ bool LLTextureFetchWorker::doWork(S32 param) // return false; } mFileSize = 0; - mLoaded = FALSE; + mLoaded = false; add(LLTextureFetch::sCacheAttempt, 1.0); @@ -1264,7 +1264,7 @@ bool LLTextureFetchWorker::doWork(S32 param) << ", should be >=0" << LL_ENDL; } setState(DECODE_IMAGE); - mInCache = TRUE; + mInCache = true; mWriteToCacheState = NOT_WRITE ; LL_DEBUGS(LOG_TXT) << mID << ": Cached. Bytes: " << mFormattedImage->getDataSize() << " Size: " << llformat("%dx%d",mFormattedImage->getWidth(),mFormattedImage->getHeight()) @@ -1476,7 +1476,7 @@ bool LLTextureFetchWorker::doWork(S32 param) } mRequestedDeltaTimer.reset(); - mLoaded = FALSE; + mLoaded = false; mGetStatus = LLCore::HttpStatus(); mGetReason.clear(); LL_DEBUGS(LOG_TXT) << "HTTP GET: " << mID << " Offset: " << mRequestedOffset @@ -1593,7 +1593,7 @@ bool LLTextureFetchWorker::doWork(S32 param) else if (http_not_sat == mGetStatus) { // Allowed, we'll accept whatever data we have as complete. - mHaveAllData = TRUE; + mHaveAllData = true; } else { @@ -1798,7 +1798,7 @@ bool LLTextureFetchWorker::doWork(S32 param) mAuxImage = NULL; llassert_always(mFormattedImage.notNull()); S32 discard = mHaveAllData ? 0 : mLoadedDiscard; - mDecoded = FALSE; + mDecoded = false; setState(DECODE_IMAGE_UPDATE); LL_DEBUGS(LOG_TXT) << mID << ": Decoding. Bytes: " << mFormattedImage->getDataSize() << " Discard: " << discard << " All Data: " << mHaveAllData << LL_ENDL; @@ -1875,7 +1875,7 @@ bool LLTextureFetchWorker::doWork(S32 param) } } llassert_always(datasize); - mWritten = FALSE; + mWritten = false; setState(WAIT_ON_WRITE); ++mCacheWriteCount; CacheWriteResponder* responder = new CacheWriteResponder(mFetcher, mID); @@ -2225,19 +2225,19 @@ S32 LLTextureFetchWorker::callbackHttpGet(LLCore::HttpResponse * response, << mFileSize << " datasize: " << mFormattedImage->getDataSize() << LL_ENDL; } - mHaveAllData = TRUE; + mHaveAllData = true; llassert_always(mDecodeHandle == 0); mFormattedImage = NULL; // discard any previous data we had } else if (data_size < mRequestedSize) { - mHaveAllData = TRUE; + mHaveAllData = true; } else if (data_size > mRequestedSize) { // *TODO: This shouldn't be happening any more (REALLY don't expect this anymore) LL_WARNS(LOG_TXT) << "data_size = " << data_size << " > requested: " << mRequestedSize << LL_ENDL; - mHaveAllData = TRUE; + mHaveAllData = true; llassert_always(mDecodeHandle == 0); mFormattedImage = NULL; // discard any previous data we had } @@ -2246,7 +2246,7 @@ S32 LLTextureFetchWorker::callbackHttpGet(LLCore::HttpResponse * response, { // We requested data but received none (and no error), // so presumably we have all of it - mHaveAllData = TRUE; + mHaveAllData = true; } mRequestedSize = data_size; @@ -2262,7 +2262,7 @@ S32 LLTextureFetchWorker::callbackHttpGet(LLCore::HttpResponse * response, mRequestedSize = -1; // error } - mLoaded = TRUE; + mLoaded = true; return data_size ; } @@ -2271,7 +2271,7 @@ S32 LLTextureFetchWorker::callbackHttpGet(LLCore::HttpResponse * response, // Threads: Ttc void LLTextureFetchWorker::callbackCacheRead(bool success, LLImageFormatted* image, - S32 imagesize, BOOL islocal) + S32 imagesize, bool islocal) { LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; LLMutexLock lock(&mWorkMutex); // +Mw @@ -2289,10 +2289,10 @@ void LLTextureFetchWorker::callbackCacheRead(bool success, LLImageFormatted* ima mInLocalCache = islocal; if (mFileSize != 0 && mFormattedImage->getDataSize() >= mFileSize) { - mHaveAllData = TRUE; + mHaveAllData = true; } } - mLoaded = TRUE; + mLoaded = true; } // -Mw // Threads: Ttc @@ -2304,7 +2304,7 @@ void LLTextureFetchWorker::callbackCacheWrite(bool success) // LL_WARNS(LOG_TXT) << "Write callback for " << mID << " with state = " << mState << LL_ENDL; return; } - mWritten = TRUE; + mWritten = true; } // -Mw ////////////////////////////////////////////////////////////////////////////// @@ -2341,7 +2341,7 @@ void LLTextureFetchWorker::callbackDecoded(bool success, LLImageRaw* raw, LLImag removeFromCache(); mDecodedDiscard = -1; // Redundant, here for clarity and paranoia } - mDecoded = TRUE; + mDecoded = true; // LL_INFOS(LOG_TXT) << mID << " : DECODE COMPLETE " << LL_ENDL; } // -Mw @@ -2418,7 +2418,7 @@ std::string LLTextureFetch::getStateString(S32 state) LLTextureFetch::LLTextureFetch(LLTextureCache* cache, bool threaded, bool qa_mode) : LLWorkerThread("TextureFetch", threaded, true), mDebugCount(0), - mDebugPause(FALSE), + mDebugPause(false), mPacketCount(0), mBadPacketCount(0), mQueueMutex(), @@ -3127,9 +3127,9 @@ LLViewerRegion* LLTextureFetchWorker::getRegion() ////////////////////////////////////////////////////////////////////////////// // Threads: T* -BOOL LLTextureFetch::isFromLocalCache(const LLUUID& id) +bool LLTextureFetch::isFromLocalCache(const LLUUID& id) { - BOOL from_cache = FALSE ; + bool from_cache = false ; LLTextureFetchWorker* worker = getWorker(id); if (worker) |