From cebb4f246045a7dc498fddd2301035a38e57221a Mon Sep 17 00:00:00 2001 From: Rye Mutt <rye@alchemyviewer.org> Date: Sun, 10 Oct 2021 08:09:37 -0400 Subject: [PATCH] Finalize a few thread classes --- indra/llcommon/llerrorthread.h | 2 +- indra/llcommon/llworkerthread.h | 2 +- indra/llfilesystem/lllfsthread.h | 4 ++-- indra/llimage/llimageworker.cpp | 2 +- indra/llimage/llimageworker.h | 4 ++-- indra/llmessage/llpumpio.cpp | 4 ++-- indra/llplugin/llpluginclassmedia.h | 2 +- indra/llplugin/llpluginprocessparent.cpp | 2 +- indra/llplugin/llpluginprocessparent.h | 2 +- indra/llprimitive/llmodelloader.h | 6 +++--- indra/newview/llappviewer.cpp | 4 ++-- indra/newview/lldirpicker.h | 2 +- indra/newview/llfloatermodelpreview.cpp | 2 +- indra/newview/lllogchat.h | 10 +++++----- indra/newview/llmeshrepository.h | 6 +++--- indra/newview/lltexturecache.h | 2 +- indra/newview/lltexturefetch.h | 2 +- indra/newview/llviewermedia.cpp | 2 +- indra/newview/llviewermenufile.h | 4 ++-- 19 files changed, 32 insertions(+), 32 deletions(-) diff --git a/indra/llcommon/llerrorthread.h b/indra/llcommon/llerrorthread.h index c238d003576..037fce7e3f7 100644 --- a/indra/llcommon/llerrorthread.h +++ b/indra/llcommon/llerrorthread.h @@ -29,7 +29,7 @@ #include "llthread.h" -class LL_COMMON_API LLErrorThread : public LLThread +class LL_COMMON_API LLErrorThread final : public LLThread { public: LLErrorThread(); diff --git a/indra/llcommon/llworkerthread.h b/indra/llcommon/llworkerthread.h index dfe80309398..75b9ead0d6b 100644 --- a/indra/llcommon/llworkerthread.h +++ b/indra/llcommon/llworkerthread.h @@ -50,7 +50,7 @@ class LL_COMMON_API LLWorkerThread : public LLQueuedThread { friend class LLWorkerClass; public: - class WorkRequest : public LLQueuedThread::QueuedRequest + class WorkRequest final : public LLQueuedThread::QueuedRequest { protected: virtual ~WorkRequest() = default; // use deleteRequest() diff --git a/indra/llfilesystem/lllfsthread.h b/indra/llfilesystem/lllfsthread.h index 58f658f7bab..51abf7c321f 100644 --- a/indra/llfilesystem/lllfsthread.h +++ b/indra/llfilesystem/lllfsthread.h @@ -39,7 +39,7 @@ // Threaded Local File System //============================================================================ -class LLLFSThread : public LLQueuedThread +class LLLFSThread final : public LLQueuedThread { //------------------------------------------------------------------------ public: @@ -61,7 +61,7 @@ class LLLFSThread : public LLQueuedThread virtual void completed(S32 bytes) = 0; }; - class Request : public QueuedRequest + class Request final : public QueuedRequest { protected: virtual ~Request(); // use deleteRequest() diff --git a/indra/llimage/llimageworker.cpp b/indra/llimage/llimageworker.cpp index d20beb11a99..c1f49250bc0 100644 --- a/indra/llimage/llimageworker.cpp +++ b/indra/llimage/llimageworker.cpp @@ -32,7 +32,7 @@ std::atomic< U32 > sImageThreads = 0; -class PoolWorkerThread : public LLThread +class PoolWorkerThread final : public LLThread { public: PoolWorkerThread(std::string name) : LLThread(name), mRequestQueue(30) diff --git a/indra/llimage/llimageworker.h b/indra/llimage/llimageworker.h index 124b411f244..9964e0dc792 100644 --- a/indra/llimage/llimageworker.h +++ b/indra/llimage/llimageworker.h @@ -34,7 +34,7 @@ class PoolWorkerThread; class LLImageFormatted; -class LLImageDecodeThread : public LLQueuedThread +class LLImageDecodeThread final : public LLQueuedThread { public: class Responder : public LLThreadSafeRefCount @@ -45,7 +45,7 @@ class LLImageDecodeThread : public LLQueuedThread virtual void completed(bool success, LLImageRaw* raw, LLImageRaw* aux) = 0; }; - class ImageRequest : public LLQueuedThread::QueuedRequest + class ImageRequest final : public LLQueuedThread::QueuedRequest { protected: virtual ~ImageRequest(); // use deleteRequest() diff --git a/indra/llmessage/llpumpio.cpp b/indra/llmessage/llpumpio.cpp index a2524e98043..473e11bee12 100644 --- a/indra/llmessage/llpumpio.cpp +++ b/indra/llmessage/llpumpio.cpp @@ -119,7 +119,7 @@ void ll_debug_poll_fd(const char* msg, const apr_pollfd_t* poll) /** * @class */ -class LLChainSleeper : public LLRunnable +class LLChainSleeper final : public LLRunnable { public: static LLRunner::run_ptr_t build(LLPumpIO* pump, S32 key) @@ -127,7 +127,7 @@ class LLChainSleeper : public LLRunnable return LLRunner::run_ptr_t(new LLChainSleeper(pump, key)); } - virtual void run(LLRunner* runner, S64 handle) + void run(LLRunner* runner, S64 handle) override { mPump->clearLock(mKey); } diff --git a/indra/llplugin/llpluginclassmedia.h b/indra/llplugin/llpluginclassmedia.h index 5ffe28aa2f2..4501ef222fb 100644 --- a/indra/llplugin/llpluginclassmedia.h +++ b/indra/llplugin/llpluginclassmedia.h @@ -36,7 +36,7 @@ #include <queue> #include "v4color.h" -class LLPluginClassMedia : public LLPluginProcessParentOwner +class LLPluginClassMedia final : public LLPluginProcessParentOwner { LOG_CLASS(LLPluginClassMedia); public: diff --git a/indra/llplugin/llpluginprocessparent.cpp b/indra/llplugin/llpluginprocessparent.cpp index 97002d8ae3c..2d43e3c829b 100644 --- a/indra/llplugin/llpluginprocessparent.cpp +++ b/indra/llplugin/llpluginprocessparent.cpp @@ -50,7 +50,7 @@ LLPluginProcessParent::mapInstances_t LLPluginProcessParent::sInstances; LLThread *LLPluginProcessParent::sReadThread = NULL; -class LLPluginProcessParentPollThread: public LLThread +class LLPluginProcessParentPollThread final : public LLThread { public: LLPluginProcessParentPollThread() : diff --git a/indra/llplugin/llpluginprocessparent.h b/indra/llplugin/llpluginprocessparent.h index b2ac59774e0..fdc88a86195 100644 --- a/indra/llplugin/llpluginprocessparent.h +++ b/indra/llplugin/llpluginprocessparent.h @@ -54,7 +54,7 @@ class LLPluginProcessParentOwner : public boost::enable_shared_from_this < LLPlu virtual void pluginDied() {}; }; -class LLPluginProcessParent : public LLPluginMessagePipeOwner +class LLPluginProcessParent final : public LLPluginMessagePipeOwner { LOG_CLASS(LLPluginProcessParent); diff --git a/indra/llprimitive/llmodelloader.h b/indra/llprimitive/llmodelloader.h index fbc74554a07..c3dd31be9fe 100644 --- a/indra/llprimitive/llmodelloader.h +++ b/indra/llprimitive/llmodelloader.h @@ -138,10 +138,10 @@ class LLModelLoader : public LLThread U32 maxJointsPerMesh); virtual ~LLModelLoader() ; - virtual void setNoNormalize() { mNoNormalize = true; } - virtual void setNoOptimize() { mNoOptimize = true; } + void setNoNormalize() { mNoNormalize = true; } + void setNoOptimize() { mNoOptimize = true; } - virtual void run(); + void run() final; static bool getSLMFilename(const std::string& model_filename, std::string& slm_filename); diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 91145b7fc3c..5e39e9eaa18 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -628,7 +628,7 @@ static void settings_modify() gDebugPipeline = gSavedSettings.getBOOL("RenderDebugPipeline"); } -class LLFastTimerLogThread : public LLThread +class LLFastTimerLogThread final : public LLThread { public: std::string mFile; @@ -5496,7 +5496,7 @@ void LLAppViewer::forceErrorCoroutineCrash() void LLAppViewer::forceErrorThreadCrash() { - class LLCrashTestThread : public LLThread + class LLCrashTestThread final : public LLThread { public: diff --git a/indra/newview/lldirpicker.h b/indra/newview/lldirpicker.h index ae77fa6c3c5..b1dd3339f96 100644 --- a/indra/newview/lldirpicker.h +++ b/indra/newview/lldirpicker.h @@ -99,7 +99,7 @@ class LLDirPicker ~LLDirPicker(); }; -class LLDirPickerThread : public LLThread +class LLDirPickerThread final : public LLThread { public: diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index d843278b22f..28156fcb750 100644 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -83,7 +83,7 @@ const S32 SMOOTH_VALUES_NUMBER = 10; const S32 PREVIEW_RENDER_SIZE = 1024; const F32 PREVIEW_CAMERA_DISTANCE = 16.f; -class LLMeshFilePicker : public LLFilePickerThread +class LLMeshFilePicker final : public LLFilePickerThread { public: LLMeshFilePicker(LLModelPreview* mp, S32 lod); diff --git a/indra/newview/lllogchat.h b/indra/newview/lllogchat.h index 3f62fcdc2bf..496ed570815 100644 --- a/indra/newview/lllogchat.h +++ b/indra/newview/lllogchat.h @@ -46,7 +46,7 @@ class LLActionThread : public LLThread LLCondition mRunCondition; }; -class LLLoadHistoryThread : public LLActionThread +class LLLoadHistoryThread final : public LLActionThread { private: const std::string& mFileName; @@ -57,8 +57,8 @@ class LLLoadHistoryThread : public LLActionThread LLLoadHistoryThread(const std::string& file_name, std::list<LLSD>* messages, const LLSD& load_params); ~LLLoadHistoryThread(); //void setHistoryParams(const std::string& file_name, const LLSD& load_params); - virtual void loadHistory(const std::string& file_name, std::list<LLSD>* messages, const LLSD& load_params); - virtual void run(); + void loadHistory(const std::string& file_name, std::list<LLSD>* messages, const LLSD& load_params); + void run() override; typedef boost::signals2::signal<void (std::list<LLSD>* messages,const std::string& file_name)> load_end_signal_t; load_end_signal_t * mLoadEndSignal; @@ -66,7 +66,7 @@ class LLLoadHistoryThread : public LLActionThread void removeLoadEndSignal(const load_end_signal_t::slot_type& cb); }; -class LLDeleteHistoryThread : public LLActionThread +class LLDeleteHistoryThread final : public LLActionThread { private: std::list<LLSD>* mMessages; @@ -75,7 +75,7 @@ class LLDeleteHistoryThread : public LLActionThread LLDeleteHistoryThread(std::list<LLSD>* messages, LLLoadHistoryThread* loadThread); ~LLDeleteHistoryThread(); - virtual void run(); + void run() override; static void deleteHistory(); }; diff --git a/indra/newview/llmeshrepository.h b/indra/newview/llmeshrepository.h index 8d263061ecd..8edc9096139 100644 --- a/indra/newview/llmeshrepository.h +++ b/indra/newview/llmeshrepository.h @@ -103,7 +103,7 @@ class LLTextureUploadData } }; -class LLPhysicsDecomp : public LLThread +class LLPhysicsDecomp final : public LLThread { public: @@ -195,7 +195,7 @@ class RequestStats LLFrameTimer mTimer; }; -class LLMeshRepoThread : public LLThread +class LLMeshRepoThread final : public LLThread { public: @@ -409,7 +409,7 @@ class LLMeshRepoThread : public LLThread // trivially serve as the HttpHandler object for request completion // notifications. -class LLMeshUploadThread : public LLThread, public LLCore::HttpHandler +class LLMeshUploadThread final : public LLThread, public LLCore::HttpHandler { private: S32 mMeshUploadTimeOut ; //maximum time in seconds to execute an uploading request. diff --git a/indra/newview/lltexturecache.h b/indra/newview/lltexturecache.h index 9afe666d63f..60930462595 100644 --- a/indra/newview/lltexturecache.h +++ b/indra/newview/lltexturecache.h @@ -38,7 +38,7 @@ class LLImageFormatted; class LLTextureCacheWorker; class LLImageRaw; -class LLTextureCache : public LLWorkerThread +class LLTextureCache final : public LLWorkerThread { friend class LLTextureCacheWorker; friend class LLTextureCacheRemoteWorker; diff --git a/indra/newview/lltexturefetch.h b/indra/newview/lltexturefetch.h index 2863a73bb66..a18aa34b928 100644 --- a/indra/newview/lltexturefetch.h +++ b/indra/newview/lltexturefetch.h @@ -53,7 +53,7 @@ class LLTextureCache; // Interface class -class LLTextureFetch : public LLWorkerThread +class LLTextureFetch final : public LLWorkerThread { friend class LLTextureFetchWorker; diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index d8633e0db7d..0c163e952c5 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -78,7 +78,7 @@ #include <boost/bind.hpp> // for SkinFolder listener #include <boost/signals2.hpp> -class LLMediaFilePicker : public LLFilePickerThread // deletes itself when done +class LLMediaFilePicker final : public LLFilePickerThread // deletes itself when done { public: LLMediaFilePicker(LLPluginClassMedia* plugin, LLFilePicker::ELoadFilter filter, bool get_multiple) diff --git a/indra/newview/llviewermenufile.h b/indra/newview/llviewermenufile.h index afca329907e..6ba2055b3bd 100644 --- a/indra/newview/llviewermenufile.h +++ b/indra/newview/llviewermenufile.h @@ -102,13 +102,13 @@ class LLFilePickerThread : public LLThread void getFile(); - virtual void run(); + void run() override final; virtual void notify(const std::vector<std::string>& filenames) = 0; }; -class LLFilePickerReplyThread : public LLFilePickerThread +class LLFilePickerReplyThread final : public LLFilePickerThread { public: -- GitLab