summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llinventoryfunctions.cpp43
-rw-r--r--indra/newview/llinventoryobserver.h35
2 files changed, 38 insertions, 40 deletions
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index ecb8f723e8..8487588404 100644
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -102,30 +102,29 @@ bool LLInventoryCollectFunctor::itemTransferCommonlyAllowed(LLInventoryItem* ite
switch(item->getType())
{
- case LLAssetType::AT_CALLINGCARD:
- // not allowed
- break;
-
- case LLAssetType::AT_OBJECT:
- if (isAgentAvatarValid() && !gAgentAvatarp->isWearingAttachment(item->getUUID()))
- {
- allowed = true;
- }
- break;
-
- case LLAssetType::AT_BODYPART:
- case LLAssetType::AT_CLOTHING:
- if(!gAgentWearables.isWearingItem(item->getUUID()))
- {
+ case LLAssetType::AT_CALLINGCARD:
+ // not allowed
+ break;
+
+ case LLAssetType::AT_OBJECT:
+ if (isAgentAvatarValid() && !gAgentAvatarp->isWearingAttachment(item->getUUID()))
+ {
+ allowed = true;
+ }
+ break;
+
+ case LLAssetType::AT_BODYPART:
+ case LLAssetType::AT_CLOTHING:
+ if(!gAgentWearables.isWearingItem(item->getUUID()))
+ {
+ allowed = true;
+ }
+ break;
+ default:
allowed = true;
- }
- break;
-
- default:
- allowed = true;
- break;
+ break;
}
-
+
return allowed;
}
diff --git a/indra/newview/llinventoryobserver.h b/indra/newview/llinventoryobserver.h
index 14948f4e49..aaa21a9da8 100644
--- a/indra/newview/llinventoryobserver.h
+++ b/indra/newview/llinventoryobserver.h
@@ -42,8 +42,8 @@ class LLViewerInventoryCategory;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class LLInventoryObserver
//
-// This class is designed to be a simple abstract base class which can
-// relay messages when the inventory changes.
+// A simple abstract base class that can relay messages when the inventory
+// changes.
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
class LLInventoryObserver
@@ -54,17 +54,17 @@ public:
// chaged() to see if the observer is interested in the change.
enum
{
- NONE = 0,
- LABEL = 1, // name changed
- INTERNAL = 2, // internal change (e.g. asset uuid different)
- ADD = 4, // something added
- REMOVE = 8, // something deleted
- STRUCTURE = 16, // structural change (eg item or folder moved)
- CALLING_CARD = 32, // (eg online, grant status, cancel)
- GESTURE = 64,
- REBUILD = 128, // item UI changed (eg item type different)
- SORT = 256, // folder needs to be resorted.
- ALL = 0xffffffff
+ NONE = 0,
+ LABEL = 1, // Name changed
+ INTERNAL = 2, // Internal change (e.g. asset uuid different)
+ ADD = 4, // Something added
+ REMOVE = 8, // Something deleted
+ STRUCTURE = 16, // Structural change (e.g. item or folder moved)
+ CALLING_CARD = 32, // Calling card change (e.g. online, grant status, cancel)
+ GESTURE = 64,
+ REBUILD = 128, // Item UI changed (e.g. item type different)
+ SORT = 256, // Folder needs to be resorted.
+ ALL = 0xffffffff
};
LLInventoryObserver();
virtual ~LLInventoryObserver();
@@ -75,11 +75,10 @@ public:
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class LLInventoryCompletionObserver
//
-// Class which can be used as a base class for doing something when
-// when all observed items are locally complete. This class implements
-// the changed() method of LLInventoryObserver and declares a new
-// method named done() which is called when all watched items have
-// complete information in the inventory model.
+// Base class for doing something when when all observed items are locally
+// complete. Implements the changed() method of LLInventoryObserver
+// and declares a new method named done() which is called when all watched items
+// have complete information in the inventory model.
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
class LLInventoryCompletionObserver : public LLInventoryObserver