diff options
author | Vadim ProductEngine <vsavchuk@productengine.com> | 2011-08-22 14:01:18 +0300 |
---|---|---|
committer | Vadim ProductEngine <vsavchuk@productengine.com> | 2011-08-22 14:01:18 +0300 |
commit | 5578c285d866488d06f99f5e72e3fb9291d37eca (patch) | |
tree | c1eb8b473ebc726108effa8d14ca0b8394806587 /indra/newview/llappviewer.cpp | |
parent | e0b5ff5c5289f965c943dcba93f0b5d94d1ba1f9 (diff) |
STORM-1543 WIP More cleanup and comments.
Diffstat (limited to 'indra/newview/llappviewer.cpp')
-rw-r--r-- | indra/newview/llappviewer.cpp | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 16c2b2d55a..326b5fd629 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -332,13 +332,11 @@ const char* const VIEWER_WINDOW_CLASSNAME = "Second Life"; * Tasks added to this list will be executed in the next LLAppViewer::idle() iteration. * All tasks are executed only once. */ -class LLDeferredTaskList: - public LLSingleton<LLDeferredTaskList>, - private LLDestroyClass<LLDeferredTaskList> +class LLDeferredTaskList: public LLSingleton<LLDeferredTaskList> { LOG_CLASS(LLDeferredTaskList); + friend class LLAppViewer; - friend class LLDestroyClass<LLDeferredTaskList>; typedef boost::signals2::signal<void()> signal_t; void addTask(const signal_t::slot_type& cb) @@ -348,15 +346,11 @@ class LLDeferredTaskList: void run() { - if (mSignal.empty()) return; - - mSignal(); - mSignal.disconnect_all_slots(); - } - - static void destroyClass() - { - instance().mSignal.disconnect_all_slots(); + if (!mSignal.empty()) + { + mSignal(); + mSignal.disconnect_all_slots(); + } } signal_t mSignal; @@ -4460,6 +4454,7 @@ void LLAppViewer::idle() } } + // Execute deferred tasks. LLDeferredTaskList::instance().run(); // Handle shutdown process, for example, |