diff options
author | Roxie Linden <roxie@lindenlab.com> | 2024-06-13 14:59:28 -0700 |
---|---|---|
committer | Roxie Linden <roxie@lindenlab.com> | 2024-06-13 14:59:28 -0700 |
commit | 5e60392c273f0c9c5efa765a05414c618381780a (patch) | |
tree | d1eedbb1dfa86e66532a6d8746b7a81e5a444d3a /indra/newview/llviewerinventory.cpp | |
parent | 0f3c3563b0861e8ea82b201aab8343d99f993bbc (diff) | |
parent | 100ebbab2437de7f5d124a0d7b8279a7a7b57656 (diff) |
Merge branch 'develop' of github.com:secondlife/viewer into roxie/webrtc-voice
Diffstat (limited to 'indra/newview/llviewerinventory.cpp')
-rw-r--r-- | indra/newview/llviewerinventory.cpp | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 16810efa01..96541b030c 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -298,7 +298,7 @@ public: return false; } LLUUID inventory_id; - if (!inventory_id.set(params[0], FALSE)) + if (!inventory_id.set(params[0], false)) { return false; } @@ -406,7 +406,7 @@ void LLViewerInventoryItem::cloneViewerItem(LLPointer<LLViewerInventoryItem>& ne } } -void LLViewerInventoryItem::updateServer(BOOL is_new) const +void LLViewerInventoryItem::updateServer(bool is_new) const { if(!mIsComplete) { @@ -494,24 +494,24 @@ void LLViewerInventoryItem::fetchFromServer(void) const } // virtual -BOOL LLViewerInventoryItem::unpackMessage(const LLSD& item) +bool LLViewerInventoryItem::unpackMessage(const LLSD& item) { - BOOL rv = LLInventoryItem::fromLLSD(item); + bool rv = LLInventoryItem::fromLLSD(item); LLLocalizedInventoryItemsDictionary::getInstance()->localizeInventoryObjectName(mName); - mIsComplete = TRUE; + mIsComplete = true; return rv; } // virtual -BOOL LLViewerInventoryItem::unpackMessage(LLMessageSystem* msg, const char* block, S32 block_num) +bool LLViewerInventoryItem::unpackMessage(LLMessageSystem* msg, const char* block, S32 block_num) { - BOOL rv = LLInventoryItem::unpackMessage(msg, block, block_num); + bool rv = LLInventoryItem::unpackMessage(msg, block, block_num); LLLocalizedInventoryItemsDictionary::getInstance()->localizeInventoryObjectName(mName); - mIsComplete = TRUE; + mIsComplete = true; return rv; } @@ -540,14 +540,14 @@ void LLViewerInventoryItem::packMessage(LLMessageSystem* msg) const } // virtual -BOOL LLViewerInventoryItem::importLegacyStream(std::istream& input_stream) +bool LLViewerInventoryItem::importLegacyStream(std::istream& input_stream) { - BOOL rv = LLInventoryItem::importLegacyStream(input_stream); - mIsComplete = TRUE; + bool rv = LLInventoryItem::importLegacyStream(input_stream); + mIsComplete = true; return rv; } -void LLViewerInventoryItem::updateParentOnServer(BOOL restamp) const +void LLViewerInventoryItem::updateParentOnServer(bool restamp) const { LLMessageSystem* msg = gMessageSystem; msg->newMessageFast(_PREHASH_MoveInventoryItem); @@ -628,7 +628,7 @@ void LLViewerInventoryCategory::packMessage(LLMessageSystem* msg) const msg->addStringFast(_PREHASH_Name, mName); } -void LLViewerInventoryCategory::updateParentOnServer(BOOL restamp) const +void LLViewerInventoryCategory::updateParentOnServer(bool restamp) const { LLMessageSystem* msg = gMessageSystem; msg->newMessageFast(_PREHASH_MoveInventoryFolder); @@ -643,7 +643,7 @@ void LLViewerInventoryCategory::updateParentOnServer(BOOL restamp) const gAgent.sendReliableMessage(); } -void LLViewerInventoryCategory::updateServer(BOOL is_new) const +void LLViewerInventoryCategory::updateServer(bool is_new) const { // communicate that change with the server. @@ -746,7 +746,7 @@ S32 LLViewerInventoryCategory::getViewerDescendentCount() const S32 descendents_actual = 0; if(cats && items) { - descendents_actual = cats->size() + items->size(); + descendents_actual = static_cast<S32>(cats->size() + items->size()); } return descendents_actual; } @@ -807,7 +807,7 @@ bool LLViewerInventoryCategory::acceptItem(LLInventoryItem* inv_item) void LLViewerInventoryCategory::determineFolderType() { /* Do NOT uncomment this code. This is for future 2.1 support of ensembles. - llassert(FALSE); + llassert(false); LLFolderType::EType original_type = getPreferredType(); if (LLFolderType::lookupIsProtectedType(original_type)) return; @@ -816,7 +816,7 @@ void LLViewerInventoryCategory::determineFolderType() U64 folder_invalid = 0; LLInventoryModel::cat_array_t category_array; LLInventoryModel::item_array_t item_array; - gInventory.collectDescendents(getUUID(),category_array,item_array,FALSE); + gInventory.collectDescendents(getUUID(),category_array,item_array,false); // For ensembles if (category_array.empty()) @@ -851,7 +851,7 @@ void LLViewerInventoryCategory::determineFolderType() { changeType(LLFolderType::FT_NONE); } - llassert(FALSE); + llassert(false); */ } @@ -882,9 +882,9 @@ void LLViewerInventoryCategory::localizeName() } // virtual -BOOL LLViewerInventoryCategory::unpackMessage(const LLSD& category) +bool LLViewerInventoryCategory::unpackMessage(const LLSD& category) { - BOOL rv = LLInventoryCategory::fromLLSD(category); + bool rv = LLInventoryCategory::fromLLSD(category); localizeName(); return rv; } @@ -1003,7 +1003,7 @@ void set_default_permissions(LLViewerInventoryItem* item, std::string perm_type) item->setPermissions(perm); - item->updateServer(FALSE); + item->updateServer(false); } } @@ -1039,7 +1039,7 @@ void create_gesture_cb(const LLUUID& inv_item) LLPreviewGesture* preview = LLPreviewGesture::show(inv_item, LLUUID::null); // Force to be entirely onscreen. - gFloaterView->adjustToFitScreen(preview, FALSE); + gFloaterView->adjustToFitScreen(preview, false); } } } @@ -1375,7 +1375,7 @@ void move_inventory_item( msg->nextBlockFast(_PREHASH_AgentData); msg->addUUIDFast(_PREHASH_AgentID, agent_id); msg->addUUIDFast(_PREHASH_SessionID, session_id); - msg->addBOOLFast(_PREHASH_Stamp, FALSE); + msg->addBOOLFast(_PREHASH_Stamp, false); msg->nextBlockFast(_PREHASH_InventoryData); msg->addUUIDFast(_PREHASH_ItemID, item_id); msg->addUUIDFast(_PREHASH_FolderID, parent_id); @@ -1594,7 +1594,7 @@ void purge_descendents_of(const LLUUID& id, LLPointer<LLInventoryCallback> cb) // Remove items from clipboard or it will remain active even if there is nothing to paste/copy LLInventoryModel::cat_array_t categories; LLInventoryModel::item_array_t items; - gInventory.collectDescendents(id, categories, items, TRUE); + gInventory.collectDescendents(id, categories, items, true); for (LLInventoryModel::cat_array_t::const_iterator it = categories.begin(); it != categories.end(); ++it) { @@ -1837,7 +1837,7 @@ void menu_create_inventory_item(LLInventoryPanel* panel, LLUUID dest_id, const L LLInventoryPanel* panel = static_cast<LLInventoryPanel*>(handle.get()); if (panel) { - panel->setSelectionByID(new_category_id, TRUE); + panel->setSelectionByID(new_category_id, true); } LL_DEBUGS(LOG_INV) << "Done creating inventory: " << new_category_id << LL_ENDL; }; @@ -1934,7 +1934,7 @@ void menu_create_inventory_item(LLInventoryPanel* panel, LLUUID dest_id, const L } if(panel) { - panel->getRootFolder()->setNeedsAutoRename(TRUE); + panel->getRootFolder()->setNeedsAutoRename(true); } } @@ -2146,7 +2146,7 @@ U32 LLViewerInventoryItem::getCRC32() const // *TODO: mantipov: should be removed with LMSortPrefix patch in llinventorymodel.cpp, EXT-3985 static char getSeparator() { return '@'; } -BOOL LLViewerInventoryItem::extractSortFieldAndDisplayName(const std::string& name, S32* sortField, std::string* displayName) +bool LLViewerInventoryItem::extractSortFieldAndDisplayName(const std::string& name, S32* sortField, std::string* displayName) { using std::string; using std::stringstream; @@ -2154,7 +2154,7 @@ BOOL LLViewerInventoryItem::extractSortFieldAndDisplayName(const std::string& na const char separator = getSeparator(); const string::size_type separatorPos = name.find(separator, 0); - BOOL result = FALSE; + bool result = false; if (separatorPos < string::npos) { @@ -2175,7 +2175,7 @@ BOOL LLViewerInventoryItem::extractSortFieldAndDisplayName(const std::string& na *displayName = name.substr(separatorPos + 1, string::npos); } - result = TRUE; + result = true; } return result; @@ -2240,9 +2240,9 @@ PermissionMask LLViewerInventoryItem::getPermissionMask() const { const LLPermissions& permissions = getPermissions(); - BOOL copy = permissions.allowCopyBy(gAgent.getID()); - BOOL mod = permissions.allowModifyBy(gAgent.getID()); - BOOL xfer = permissions.allowOperationBy(PERM_TRANSFER, gAgent.getID()); + bool copy = permissions.allowCopyBy(gAgent.getID()); + bool mod = permissions.allowModifyBy(gAgent.getID()); + bool xfer = permissions.allowOperationBy(PERM_TRANSFER, gAgent.getID()); PermissionMask perm_mask = 0; if (copy) perm_mask |= PERM_COPY; if (mod) perm_mask |= PERM_MODIFY; @@ -2305,11 +2305,11 @@ LLUUID find_possible_item_for_regeneration(const LLViewerInventoryItem *target_i // This currently dosen't work, because the sim does not allow us // to change an item's assetID. -BOOL LLViewerInventoryItem::regenerateLink() +bool LLViewerInventoryItem::regenerateLink() { const LLUUID target_item_id = find_possible_item_for_regeneration(this); if (target_item_id.isNull()) - return FALSE; + return false; LLViewerInventoryCategory::cat_array_t cats; LLViewerInventoryItem::item_array_t items; LLAssetIDMatches asset_id_matches(getAssetUUID()); @@ -2324,9 +2324,9 @@ BOOL LLViewerInventoryItem::regenerateLink() { LLViewerInventoryItem *item = (*item_iter); item->setAssetUUID(target_item_id); - item->updateServer(FALSE); + item->updateServer(false); gInventory.addChangedMask(LLInventoryObserver::REBUILD, item->getUUID()); } gInventory.notifyObservers(); - return TRUE; + return true; } |