summaryrefslogtreecommitdiff
path: root/indra/newview/llappearancemgr.h
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2010-04-01 17:05:25 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2010-04-01 17:05:25 -0400
commit39308422f153b5aada2a8f1c18689b7b40587d70 (patch)
tree15fe8f989f13acd742a5d5d1574478adf340f632 /indra/newview/llappearancemgr.h
parent97f9dbee2ccd32b666c14bd79111bc2dbe2523e2 (diff)
Cleanup and consolidation
Diffstat (limited to 'indra/newview/llappearancemgr.h')
-rw-r--r--indra/newview/llappearancemgr.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h
index 2d6a0a10ed..7b39a13a72 100644
--- a/indra/newview/llappearancemgr.h
+++ b/indra/newview/llappearancemgr.h
@@ -173,17 +173,17 @@ LLUUID findDescendentCategoryIDByName(const LLUUID& parent_id,const std::string&
// Shim class and template function to allow arbitrary boost::bind
// expressions to be run as one-time idle callbacks.
template <typename T>
-class OnIdleCallback
+class OnIdleCallbackOneTime
{
public:
- OnIdleCallback(T callable):
+ OnIdleCallbackOneTime(T callable):
mCallable(callable)
{
}
static void onIdle(void *data)
{
gIdleCallbacks.deleteFunction(onIdle, data);
- OnIdleCallback<T>* self = reinterpret_cast<OnIdleCallback<T>*>(data);
+ OnIdleCallbackOneTime<T>* self = reinterpret_cast<OnIdleCallbackOneTime<T>*>(data);
self->call();
delete self;
}
@@ -196,14 +196,15 @@ private:
};
template <typename T>
-void doOnIdle(T callable)
+void doOnIdleOneTime(T callable)
{
- OnIdleCallback<T>* cb_functor = new OnIdleCallback<T>(callable);
- gIdleCallbacks.addFunction(&OnIdleCallback<T>::onIdle,cb_functor);
+ OnIdleCallbackOneTime<T>* cb_functor = new OnIdleCallbackOneTime<T>(callable);
+ gIdleCallbacks.addFunction(&OnIdleCallbackOneTime<T>::onIdle,cb_functor);
}
// Shim class and template function to allow arbitrary boost::bind
// expressions to be run as recurring idle callbacks.
+// Callable should return true when done, false to continue getting called.
template <typename T>
class OnIdleCallbackRepeating
{
@@ -212,7 +213,7 @@ public:
mCallable(callable)
{
}
- // Will keep getting called until the callable returns false.
+ // Will keep getting called until the callable returns true.
static void onIdle(void *data)
{
OnIdleCallbackRepeating<T>* self = reinterpret_cast<OnIdleCallbackRepeating<T>*>(data);
@@ -252,7 +253,7 @@ public:
virtual void done()
{
gInventory.removeObserver(this);
- doOnIdle(mCallable);
+ doOnIdleOneTime(mCallable);
delete this;
}
protected: