diff options
Diffstat (limited to 'indra/newview/llviewerinventory.cpp')
-rw-r--r-- | indra/newview/llviewerinventory.cpp | 50 |
1 files changed, 10 insertions, 40 deletions
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index bcfb8ecbbd..3001992630 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -1172,7 +1172,7 @@ const std::string& LLViewerInventoryItem::getName() const return linked_category->getName(); } - return getDisplayName(); + return LLInventoryItem::getName(); } /** @@ -1340,42 +1340,17 @@ void LLFavoritesOrderStorage::cleanup() gInventory.collectDescendents(fav_id, cats, items, LLInventoryModel::EXCLUDE_TRASH); IsNotInFavorites is_not_in_fav(items); -
- sort_index_map_t aTempMap;
- //copy unremoved values from mSortIndexes to aTempMap
- std::remove_copy_if(mSortIndexes.begin(), mSortIndexes.end(),
- inserter(aTempMap, aTempMap.begin()),
- is_not_in_fav);
-
- //Swap the contents of mSortIndexes and aTempMap
- mSortIndexes.swap(aTempMap); -} + sort_index_map_t aTempMap; + //copy unremoved values from mSortIndexes to aTempMap + std::remove_copy_if(mSortIndexes.begin(), mSortIndexes.end(), + inserter(aTempMap, aTempMap.begin()), + is_not_in_fav); -// *TODO: mantipov: REMOVE, EXT-3985 -const std::string& LLViewerInventoryItem::getDisplayName() const -{ - return LLInventoryItem::getName(); -/* - std::string result; - BOOL hasSortField = extractSortFieldAndDisplayName(0, &result); - - mDisplayName = LLInventoryItem::getName(); - - return mDisplayName = hasSortField ? result : LLInventoryItem::getName(); -*/ + //Swap the contents of mSortIndexes and aTempMap + mSortIndexes.swap(aTempMap); } -// *TODO: mantipov: REMOVE, EXT-3985 -// static -std::string LLViewerInventoryItem::getDisplayName(const std::string& name) -{ - llassert(false); - std::string result; - BOOL hasSortField = extractSortFieldAndDisplayName(name, 0, &result); - - return hasSortField ? result : name; -} S32 LLViewerInventoryItem::getSortField() const { @@ -1387,12 +1362,6 @@ void LLViewerInventoryItem::setSortField(S32 sortField) LLFavoritesOrderStorage::instance().setSortIndex(mUUID, sortField); } -// *TODO: mantipov: REMOVE, EXT-3985 -void LLViewerInventoryItem::rename(const std::string& n) -{ - LLInventoryItem::rename(n); -} - const LLPermissions& LLViewerInventoryItem::getPermissions() const { // Use the actual permissions of the symlink, not its parent. @@ -1481,7 +1450,8 @@ U32 LLViewerInventoryItem::getCRC32() const return LLInventoryItem::getCRC32(); } -// *TODO: mantipov: REMOVE, EXT-3985 +// *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) { using std::string; |