summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerinventory.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewerinventory.h')
-rw-r--r--indra/newview/llviewerinventory.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h
index 690c23e6a5..ef3586537b 100644
--- a/indra/newview/llviewerinventory.h
+++ b/indra/newview/llviewerinventory.h
@@ -36,6 +36,7 @@
#include "llinventory.h"
#include "llframetimer.h"
#include "llwearable.h"
+#include "llui.h" //for LLDestroyClass
#include <boost/signals2.hpp> // boost::signals2::trackable
@@ -304,8 +305,9 @@ private:
// misc functions
//void inventory_reliable_callback(void**, S32 status);
-class LLInventoryCallbackManager
+class LLInventoryCallbackManager : public LLDestroyClass<LLInventoryCallbackManager>
{
+ friend class LLDestroyClass<LLInventoryCallbackManager>;
public:
LLInventoryCallbackManager();
~LLInventoryCallbackManager();
@@ -313,9 +315,12 @@ public:
void fire(U32 callback_id, const LLUUID& item_id);
U32 registerCB(LLPointer<LLInventoryCallback> cb);
private:
- std::map<U32, LLPointer<LLInventoryCallback> > mMap;
+ typedef std::map<U32, LLPointer<LLInventoryCallback> > callback_map_t;
+ callback_map_t mMap;
U32 mLastCallback;
static LLInventoryCallbackManager *sInstance;
+ static void destroyClass();
+
public:
static bool is_instantiated() { return sInstance != NULL; }
};