From 9e854b697a06abed2a0917fb6120445f176764f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20N=C3=A6sbye=20Christensen?= Date: Fri, 16 Feb 2024 19:29:51 +0100 Subject: misc: BOOL to bool --- indra/llmessage/llassetstorage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llmessage/llassetstorage.cpp') diff --git a/indra/llmessage/llassetstorage.cpp b/indra/llmessage/llassetstorage.cpp index f38a5e663e..60d95c3367 100644 --- a/indra/llmessage/llassetstorage.cpp +++ b/indra/llmessage/llassetstorage.cpp @@ -1020,7 +1020,7 @@ void LLAssetStorage::processUploadComplete(LLMessageSystem *msg, void **user_dat LLUUID uuid; S8 asset_type_s8; LLAssetType::EType asset_type; - BOOL success = FALSE; + bool success = false; msg->getUUIDFast(_PREHASH_AssetBlock, _PREHASH_UUID, uuid); msg->getS8Fast(_PREHASH_AssetBlock, _PREHASH_Type, asset_type_s8); -- cgit v1.2.3 From f1c97f4057833220a2e9ac045d701208e30457d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20N=C3=A6sbye=20Christensen?= Date: Sun, 18 Feb 2024 16:41:22 +0100 Subject: misc: BOOL to bool --- indra/llmessage/llassetstorage.cpp | 46 +++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'indra/llmessage/llassetstorage.cpp') diff --git a/indra/llmessage/llassetstorage.cpp b/indra/llmessage/llassetstorage.cpp index 60d95c3367..2f76e686ec 100644 --- a/indra/llmessage/llassetstorage.cpp +++ b/indra/llmessage/llassetstorage.cpp @@ -354,9 +354,9 @@ void LLAssetStorage::_init(LLMessageSystem *msg, LLAssetStorage::~LLAssetStorage() { - mShutDown = TRUE; + mShutDown = true; - _cleanupRequests(TRUE, LL_ERR_CIRCUIT_GONE); + _cleanupRequests(true, LL_ERR_CIRCUIT_GONE); if (gMessageSystem) { @@ -378,10 +378,10 @@ void LLAssetStorage::setUpstream(const LLHost &upstream_host) void LLAssetStorage::checkForTimeouts() { - _cleanupRequests(FALSE, LL_ERR_TCP_TIMEOUT); + _cleanupRequests(false, LL_ERR_TCP_TIMEOUT); } -void LLAssetStorage::_cleanupRequests(BOOL all, S32 error) +void LLAssetStorage::_cleanupRequests(bool all, S32 error) { F64Seconds mt_secs = LLMessageSystem::getMessageTimeSeconds(); @@ -436,7 +436,7 @@ void LLAssetStorage::_cleanupRequests(BOOL all, S32 error) } -BOOL LLAssetStorage::hasLocalAsset(const LLUUID &uuid, const LLAssetType::EType type) +bool LLAssetStorage::hasLocalAsset(const LLUUID &uuid, const LLAssetType::EType type) { return LLFileSystem::getExists(uuid, type); } @@ -450,7 +450,7 @@ bool LLAssetStorage::findInCacheAndInvokeCallback(const LLUUID& uuid, LLAssetTyp llassert(callback != NULL); } - BOOL exists = LLFileSystem::getExists(uuid, type); + bool exists = LLFileSystem::getExists(uuid, type); if (exists) { LLFileSystem file(uuid, type); @@ -482,7 +482,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, LLAssetStorage::LLGetAssetCallback callback, void *user_data, - BOOL is_priority) + bool is_priority) { LL_DEBUGS("AssetStorage") << "LLAssetStorage::getAssetData() - " << uuid << "," << LLAssetType::lookup(type) << LL_ENDL; @@ -523,7 +523,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, return; } - BOOL exists = LLFileSystem::getExists(uuid, type); + bool exists = LLFileSystem::getExists(uuid, type); LLFileSystem file(uuid, type); U32 size = exists ? file.getSize() : 0; @@ -547,7 +547,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, file.remove(); } - BOOL duplicate = FALSE; + bool duplicate = false; // check to see if there's a pending download of this uuid already for (request_list_t::iterator iter = mPendingDownloads.begin(); @@ -566,7 +566,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, // this is a duplicate request // queue the request, but don't actually ask for it again - duplicate = TRUE; + duplicate = true; } } if (duplicate) @@ -700,7 +700,7 @@ void LLAssetStorage::getEstateAsset( EstateAssetType etype, LLGetAssetCallback callback, void *user_data, - BOOL is_priority) + bool is_priority) { LL_DEBUGS() << "LLAssetStorage::getEstateAsset() - " << asset_id << "," << LLAssetType::lookup(atype) << ", estatetype " << etype << LL_ENDL; @@ -724,7 +724,7 @@ void LLAssetStorage::getEstateAsset( return; } - BOOL exists = LLFileSystem::getExists(asset_id, atype); + bool exists = LLFileSystem::getExists(asset_id, atype); LLFileSystem file(asset_id, atype); U32 size = exists ? file.getSize() : 0; @@ -846,7 +846,7 @@ void LLAssetStorage::getInvItemAsset( LLAssetType::EType atype, LLGetAssetCallback callback, void *user_data, - BOOL is_priority) + bool is_priority) { LL_DEBUGS() << "LLAssetStorage::getInvItemAsset() - " << asset_id << "," << LLAssetType::lookup(atype) << LL_ENDL; @@ -995,12 +995,12 @@ void LLAssetStorage::uploadCompleteCallback( return; } LLAssetRequest *req = (LLAssetRequest *)user_data; - BOOL success = TRUE; + bool success = true; if (result) { LL_WARNS("AssetStorage") << "LLAssetStorage::uploadCompleteCallback " << result << ":" << getErrorString(result) << " trying to upload file to upstream provider" << LL_ENDL; - success = FALSE; + success = false; } // we're done grabbing the file, tell the client @@ -1030,7 +1030,7 @@ void LLAssetStorage::processUploadComplete(LLMessageSystem *msg, void **user_dat this_ptr->_callUploadCallbacks(uuid, asset_type, success, LLExtStat::NONE); } -void LLAssetStorage::_callUploadCallbacks(const LLUUID &uuid, LLAssetType::EType asset_type, BOOL success, LLExtStat ext_status ) +void LLAssetStorage::_callUploadCallbacks(const LLUUID &uuid, LLAssetType::EType asset_type, bool success, LLExtStat ext_status ) { // SJB: We process the callbacks in reverse order, I do not know if this is important, // but I didn't want to mess with it. @@ -1348,7 +1348,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, S32, LLExtStat), void *user_data, - BOOL is_priority) + bool is_priority) { // check for duplicates here, since we're about to fool the normal duplicate checker for (request_list_t::iterator iter = mPendingDownloads.begin(); @@ -1391,7 +1391,7 @@ void LLAssetStorage::legacyGetDataCallback(const LLUUID &uuid, std::string filename; // Check if the asset is marked toxic, and don't load bad stuff - BOOL toxic = gAssetStorage->isAssetToxic( uuid ); + bool toxic = gAssetStorage->isAssetToxic( uuid ); if ( !status && !toxic ) @@ -1489,9 +1489,9 @@ void LLAssetStorage::reportMetric( const LLUUID& asset_id, const LLAssetType::ET // Check if an asset is in the toxic map. If it is, the entry is updated -BOOL LLAssetStorage::isAssetToxic( const LLUUID& uuid ) +bool LLAssetStorage::isAssetToxic( const LLUUID& uuid ) { - BOOL is_toxic = FALSE; + bool is_toxic = false; if ( !uuid.isNull() ) { @@ -1499,8 +1499,8 @@ BOOL LLAssetStorage::isAssetToxic( const LLUUID& uuid ) if ( iter != mToxicAssetMap.end() ) { // Found toxic asset (*iter).second = LLFrameTimer::getTotalTime() + TOXIC_ASSET_LIFETIME; - is_toxic = TRUE; - } + is_toxic = true; + } } return is_toxic; } @@ -1509,7 +1509,7 @@ BOOL LLAssetStorage::isAssetToxic( const LLUUID& uuid ) // Clean the toxic asset list, remove old entries -void LLAssetStorage::flushOldToxicAssets( BOOL force_it ) +void LLAssetStorage::flushOldToxicAssets( bool force_it ) { // Scan and look for old entries U64 now = LLFrameTimer::getTotalTime(); -- cgit v1.2.3 From 321f283032688f0feddc696654e86f62af07121a Mon Sep 17 00:00:00 2001 From: Ansariel Date: Mon, 19 Feb 2024 15:01:44 +0100 Subject: Replace remaining BOOL with bool llinventory and llmessage --- indra/llmessage/llassetstorage.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'indra/llmessage/llassetstorage.cpp') diff --git a/indra/llmessage/llassetstorage.cpp b/indra/llmessage/llassetstorage.cpp index 2f76e686ec..13fda24e62 100644 --- a/indra/llmessage/llassetstorage.cpp +++ b/indra/llmessage/llassetstorage.cpp @@ -198,14 +198,14 @@ LLBaseDownloadRequest::LLBaseDownloadRequest(const LLUUID &uuid, const LLAssetTy mDownCallback(), mUserData(NULL), mHost(), - mIsTemp(FALSE), - mIsPriority(FALSE), - mDataSentInFirstPacket(FALSE), - mDataIsInCache(FALSE) + mIsTemp(false), + mIsPriority(false), + mDataSentInFirstPacket(false), + mDataIsInCache(false) { // Need to guarantee that this time is up to date, we may be creating a circuit even though we haven't been // running a message system loop. - mTime = LLMessageSystem::getMessageTimeSeconds(TRUE); + mTime = LLMessageSystem::getMessageTimeSeconds(true); } // virtual @@ -228,8 +228,8 @@ LLAssetRequest::LLAssetRequest(const LLUUID &uuid, const LLAssetType::EType type : LLBaseDownloadRequest(uuid, type), mUpCallback(), mInfoCallback( NULL ), - mIsLocal(FALSE), - mIsUserWaiting(FALSE), + mIsLocal(false), + mIsUserWaiting(false), mTimeout(LL_ASSET_STORAGE_TIMEOUT), mBytesFetched(0) { @@ -344,7 +344,7 @@ void LLAssetStorage::_init(LLMessageSystem *msg, LLXferManager *xfer, const LLHost &upstream_host) { - mShutDown = FALSE; + mShutDown = false; mMessageSys = msg; mXferManager = xfer; -- cgit v1.2.3 From b42f9d836b4c0f7fbd4bdae1734021e2a09fdbe8 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sat, 1 Jun 2024 15:49:26 +0200 Subject: Re-enable a lot of compiler warnings for MSVC and address the C4267 "possible loss of precision" warnings --- indra/llmessage/llassetstorage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llmessage/llassetstorage.cpp') diff --git a/indra/llmessage/llassetstorage.cpp b/indra/llmessage/llassetstorage.cpp index 13fda24e62..b3390451a2 100644 --- a/indra/llmessage/llassetstorage.cpp +++ b/indra/llmessage/llassetstorage.cpp @@ -1125,7 +1125,7 @@ S32 LLAssetStorage::getNumPending(LLAssetStorage::ERequestType rt) const S32 num_pending = -1; if (requests) { - num_pending = requests->size(); + num_pending = static_cast(requests->size()); } return num_pending; } -- cgit v1.2.3