From 1cedebe58cadf31be62001e54f28b314f1cb6dca Mon Sep 17 00:00:00 2001 From: Rye Mutt <rye@alchemyviewer.org> Date: Wed, 30 Dec 2020 12:36:42 -0500 Subject: [PATCH] A pile of small changes to reduce diff --- indra/llcommon/llallocator_heap_profile.cpp | 2 +- indra/llcommon/llcallstack.h | 2 +- indra/llcommon/lldate.h | 5 ----- indra/llcommon/lldependencies.h | 2 +- indra/llcommon/llpointer.h | 1 - indra/llmath/llvolumeoctree.cpp | 2 +- indra/llmessage/llassetstorage.cpp | 13 +------------ indra/llmessage/llchainio.h | 4 ++-- indra/llmessage/llhttpnode.cpp | 2 +- indra/llmessage/lltrustedmessageservice.cpp | 2 +- indra/llmessage/message.cpp | 2 +- indra/llmessage/partsyspacket.cpp | 4 ++-- indra/llplugin/llpluginclassmedia.h | 2 +- indra/llprimitive/llprimtexturelist.cpp | 2 +- indra/llrender/llrender.cpp | 4 ---- 15 files changed, 14 insertions(+), 35 deletions(-) diff --git a/indra/llcommon/llallocator_heap_profile.cpp b/indra/llcommon/llallocator_heap_profile.cpp index 76cb03f6058..b2eafde1aaf 100644 --- a/indra/llcommon/llallocator_heap_profile.cpp +++ b/indra/llcommon/llallocator_heap_profile.cpp @@ -112,7 +112,7 @@ void LLAllocatorHeapProfile::parse(std::string const & prof_text) { ++j; // skip the '@' - mLines.emplace_back(line(live_count, live_size, tot_count, tot_size)); + mLines.push_back(line(live_count, live_size, tot_count, tot_size)); line & current_line = mLines.back(); for(; j != line_elems.end(); ++j) diff --git a/indra/llcommon/llcallstack.h b/indra/llcommon/llcallstack.h index 799208e77a2..1e20e9d3050 100644 --- a/indra/llcommon/llcallstack.h +++ b/indra/llcommon/llcallstack.h @@ -59,7 +59,7 @@ class LLContextStrings class LLScopedContextString { public: - LLScopedContextString(const std::string str): + LLScopedContextString(std::string str): m_str(std::move(str)) { LLContextStrings::addContextString(m_str); diff --git a/indra/llcommon/lldate.h b/indra/llcommon/lldate.h index d223d75e919..bcb6ab6704a 100644 --- a/indra/llcommon/lldate.h +++ b/indra/llcommon/lldate.h @@ -49,11 +49,6 @@ class LL_COMMON_API LLDate */ LLDate(); - /** - * @brief Construct a date equal to the source date. - */ - LLDate(const LLDate& date) = default; - /** * @brief Construct a date from a seconds since epoch value. * diff --git a/indra/llcommon/lldependencies.h b/indra/llcommon/lldependencies.h index 6bc5331dc24..6b6a9500e0a 100644 --- a/indra/llcommon/lldependencies.h +++ b/indra/llcommon/lldependencies.h @@ -583,7 +583,7 @@ class LLDependencies: public LLDependenciesBase if (found != non_const_this->mNodes.end()) { // Make an iterator of appropriate type. - mCache.emplace_back(iterator(found, value_extract)); + mCache.push_back(iterator(found, value_extract)); } } } diff --git a/indra/llcommon/llpointer.h b/indra/llcommon/llpointer.h index ed3bd7dfb90..b00bb2777fe 100644 --- a/indra/llcommon/llpointer.h +++ b/indra/llcommon/llpointer.h @@ -341,7 +341,6 @@ template <class Type> class LLConstPointer return *this; } - // support assignment up the type hierarchy. See Item 45 in Effective C++, 3rd Ed. inline void swap(LLConstPointer<Type>& ptr) noexcept { Type* temp = mPointer; diff --git a/indra/llmath/llvolumeoctree.cpp b/indra/llmath/llvolumeoctree.cpp index 52bbf08b4ba..0c83cb6e4f1 100644 --- a/indra/llmath/llvolumeoctree.cpp +++ b/indra/llmath/llvolumeoctree.cpp @@ -80,7 +80,7 @@ LLVolumeOctreeListener::LLVolumeOctreeListener(LLOctreeNode<LLVolumeTriangle>* n node->addListener(this); } -void LLVolumeOctreeListener::handleChildAddition(const LLOctreeNode<LLVolumeTriangle>* parent, +void LLVolumeOctreeListener::handleChildAddition(const LLOctreeNode<LLVolumeTriangle>* parent, LLOctreeNode<LLVolumeTriangle>* child) { new LLVolumeOctreeListener(child); diff --git a/indra/llmessage/llassetstorage.cpp b/indra/llmessage/llassetstorage.cpp index 0e5bd395696..27df8418f3e 100644 --- a/indra/llmessage/llassetstorage.cpp +++ b/indra/llmessage/llassetstorage.cpp @@ -469,11 +469,9 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, void *user_data, BOOL is_priority) { -#if SHOW_DEBUG LL_DEBUGS("AssetStorage") << "LLAssetStorage::getAssetData() - " << uuid << "," << LLAssetType::lookup(type) << LL_ENDL; LL_DEBUGS("AssetStorage") << "ASSET_TRACE requesting " << uuid << " type " << LLAssetType::lookup(type) << LL_ENDL; -#endif if (user_data) { @@ -483,9 +481,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, if (mShutDown) { -#if SHOW_DEBUG LL_DEBUGS("AssetStorage") << "ASSET_TRACE cancelled " << uuid << " type " << LLAssetType::lookup(type) << " shutting down" << LL_ENDL; -#endif if (callback) { @@ -509,9 +505,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, // Try static VFS first. if (findInStaticVFSAndInvokeCallback(uuid,type,callback,user_data)) { -#if SHOW_DEBUG LL_DEBUGS("AssetStorage") << "ASSET_TRACE asset " << uuid << " found in static VFS" << LL_ENDL; -#endif return; } @@ -528,9 +522,8 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, { callback(mVFS, uuid, type, user_data, LL_ERR_NOERR, LLExtStat::VFS_CACHED); } -#if SHOW_DEBUG + LL_DEBUGS("AssetStorage") << "ASSET_TRACE asset " << uuid << " found in VFS" << LL_ENDL; -#endif } else { @@ -562,13 +555,11 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, duplicate = TRUE; } } -#if SHOW_DEBUG if (duplicate) { LL_DEBUGS("AssetStorage") << "Adding additional non-duplicate request for asset " << uuid << "." << LLAssetType::lookup(type) << LL_ENDL; } -#endif _queueDataRequest(uuid, type, callback, user_data, duplicate, is_priority); } @@ -1362,9 +1353,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, user_data == ((LLLegacyAssetRequest *)tmp->mUserData)->mUserData) { // this is a duplicate from the same subsystem - throw it away -#if SHOW_DEBUG LL_DEBUGS("AssetStorage") << "Discarding duplicate request for UUID " << uuid << LL_ENDL; -#endif return; } } diff --git a/indra/llmessage/llchainio.h b/indra/llmessage/llchainio.h index db5a907d1e4..6e4d6c20138 100644 --- a/indra/llmessage/llchainio.h +++ b/indra/llmessage/llchainio.h @@ -104,7 +104,7 @@ class LLSimpleIOFactory : public LLChainIOFactory public: virtual bool build(LLPumpIO::chain_t& chain, LLSD context) const { - chain.emplace_back(LLIOPipe::ptr_t(new Pipe)); + chain.push_back(LLIOPipe::ptr_t(new Pipe)); return true; } }; @@ -123,7 +123,7 @@ class LLCloneIOFactory : public LLChainIOFactory virtual bool build(LLPumpIO::chain_t& chain, LLSD context) const { - chain.emplace_back(LLIOPipe::ptr_t(new Pipe(*mOriginal))); + chain.push_back(LLIOPipe::ptr_t(new Pipe(*mOriginal))); return true; } diff --git a/indra/llmessage/llhttpnode.cpp b/indra/llmessage/llhttpnode.cpp index dff1020bd9f..8b8dfde030d 100644 --- a/indra/llmessage/llhttpnode.cpp +++ b/indra/llmessage/llhttpnode.cpp @@ -343,7 +343,7 @@ static void append_node_paths(LLSD& result, for (; i != end; ++i) { - result.append(absl::StrCat(name, "/", (*i).asString())); + result.append(name + "/" + (*i).asString()); } } diff --git a/indra/llmessage/lltrustedmessageservice.cpp b/indra/llmessage/lltrustedmessageservice.cpp index 5afd17a1f94..33944f78830 100644 --- a/indra/llmessage/lltrustedmessageservice.cpp +++ b/indra/llmessage/lltrustedmessageservice.cpp @@ -49,7 +49,7 @@ void LLTrustedMessageService::post(LLHTTPNode::ResponsePtr response, ["x-secondlife-udp-listen-port"]; LLSD message_data; - std::string sender = absl::StrCat(senderIP, ":", senderPort); + std::string sender = senderIP + ":" + senderPort; message_data["sender"] = sender; message_data["body"] = input; diff --git a/indra/llmessage/message.cpp b/indra/llmessage/message.cpp index 9263fe29c50..48071ef3610 100644 --- a/indra/llmessage/message.cpp +++ b/indra/llmessage/message.cpp @@ -2056,7 +2056,7 @@ void LLMessageSystem::dispatch( return; } - std::string path = absl::StrCat("/message/", msg_name); + std::string path = "/message/" + msg_name; LLSD context; const LLHTTPNode* handler = messageRootNode().traverse(path, context); if (!handler) diff --git a/indra/llmessage/partsyspacket.cpp b/indra/llmessage/partsyspacket.cpp index 4bc73031842..f499ae2f6d9 100644 --- a/indra/llmessage/partsyspacket.cpp +++ b/indra/llmessage/partsyspacket.cpp @@ -931,8 +931,8 @@ U32 LLPartSysCompressedPacket::readUUID(LLPartInitData *in, U32 startByte) } startByte++; // cause we actually have to read the UUID now. - memcpy(in->mImageUuid.mData, bufPtr, 16); /* Flawfinder: ignore */ - return (startByte+16); + memcpy(in->mImageUuid.mData, bufPtr, UUID_BYTES); /* Flawfinder: ignore */ + return (startByte + UUID_BYTES); } diff --git a/indra/llplugin/llpluginclassmedia.h b/indra/llplugin/llpluginclassmedia.h index 2633852a813..2feda4630b5 100644 --- a/indra/llplugin/llpluginclassmedia.h +++ b/indra/llplugin/llpluginclassmedia.h @@ -148,7 +148,7 @@ class LLPluginClassMedia : public LLPluginProcessParentOwner // "Exited" means any regular or error state after "Running" (plugin may have crashed or exited normally) bool isPluginExited(void) { return mPlugin?mPlugin->isDone():false; }; - std::string getPluginVersion() { return mPlugin?mPlugin->getPluginVersion():std::string(""); }; + std::string getPluginVersion() { return mPlugin?mPlugin->getPluginVersion():std::string(); }; bool getDisableTimeout() { return mPlugin?mPlugin->getDisableTimeout():false; }; void setDisableTimeout(bool disable) { if(mPlugin) mPlugin->setDisableTimeout(disable); }; diff --git a/indra/llprimitive/llprimtexturelist.cpp b/indra/llprimitive/llprimtexturelist.cpp index 854003d42b1..278576b9ae5 100644 --- a/indra/llprimitive/llprimtexturelist.cpp +++ b/indra/llprimitive/llprimtexturelist.cpp @@ -134,7 +134,7 @@ S32 LLPrimTextureList::copyTexture(const U8 index, const LLTextureEntry& te) return TEM_CHANGE_NONE; } - // we're changing an existing entry + // we're changing an existing entry llassert(mEntryList[index]); delete (mEntryList[index]); if (te != LLTextureEntry::null) diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp index eed1de2bfe7..6e4de98793a 100644 --- a/indra/llrender/llrender.cpp +++ b/indra/llrender/llrender.cpp @@ -275,7 +275,6 @@ bool LLTexUnit::bind(LLTexture* texture, bool for_rendering, bool forceBind) } else { -#if SHOW_DEBUG if (texture) { LL_DEBUGS() << "NULL LLTexUnit::bind GL image" << LL_ENDL; @@ -284,7 +283,6 @@ bool LLTexUnit::bind(LLTexture* texture, bool for_rendering, bool forceBind) { LL_DEBUGS() << "NULL LLTexUnit::bind texture" << LL_ENDL; } -#endif return false; } } @@ -303,9 +301,7 @@ bool LLTexUnit::bind(LLImageGL* texture, bool for_rendering, bool forceBind) if(!texture) { -#if SHOW_DEBUG LL_DEBUGS() << "NULL LLTexUnit::bind texture" << LL_ENDL; -#endif return false; } -- GitLab