Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
XDG Integration
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
JennaHuntsman
XDG Integration
Commits
855f5390
Commit
855f5390
authored
3 years ago
by
Andrey Kleshchev
Browse files
Options
Downloads
Patches
Plain Diff
SL-16799 Clean up use of hardcoded folder names
parent
26e03f0c
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
indra/llcommon/llalignedarray.h
+2
-2
2 additions, 2 deletions
indra/llcommon/llalignedarray.h
indra/newview/llfriendcard.cpp
+49
-8
49 additions, 8 deletions
indra/newview/llfriendcard.cpp
indra/newview/llfriendcard.h
+1
-0
1 addition, 0 deletions
indra/newview/llfriendcard.h
with
52 additions
and
10 deletions
indra/llcommon/llalignedarray.h
+
2
−
2
View file @
855f5390
...
...
@@ -116,7 +116,7 @@ void LLAlignedArray<T, alignment>::resize(U32 size)
template
<
class
T
,
U32
alignment
>
T
&
LLAlignedArray
<
T
,
alignment
>::
operator
[](
int
idx
)
{
if
(
idx
>=
mElementCount
)
if
(
idx
>=
mElementCount
||
idx
<
0
)
{
LL_ERRS
()
<<
"Out of bounds LLAlignedArray, requested: "
<<
(
S32
)
idx
<<
" size: "
<<
mElementCount
<<
LL_ENDL
;
}
...
...
@@ -126,7 +126,7 @@ T& LLAlignedArray<T, alignment>::operator[](int idx)
template
<
class
T
,
U32
alignment
>
const
T
&
LLAlignedArray
<
T
,
alignment
>::
operator
[](
int
idx
)
const
{
if
(
idx
>=
mElementCount
)
if
(
idx
>=
mElementCount
||
idx
<
0
)
{
LL_ERRS
()
<<
"Out of bounds LLAlignedArray, requested: "
<<
(
S32
)
idx
<<
" size: "
<<
mElementCount
<<
LL_ENDL
;
}
...
...
This diff is collapsed.
Click to expand it.
indra/newview/llfriendcard.cpp
+
49
−
8
View file @
855f5390
...
...
@@ -327,22 +327,63 @@ void LLFriendCardsManager::syncFriendCardsFolders()
/************************************************************************/
/* Private Methods */
/************************************************************************/
const
LLUUID
&
LLFriendCardsManager
::
findF
riendFolderUUIDImpl
(
)
const
const
LLUUID
&
LLFriendCardsManager
::
findF
irstCallingCardSubfolder
(
const
LLUUID
&
parent_id
)
const
{
const
LLUUID
callingCardsFolderID
=
gInventory
.
findCategoryUUIDForType
(
LLFolderType
::
FT_CALLINGCARD
);
if
(
parent_id
.
isNull
())
{
return
LLUUID
::
null
;
}
std
::
string
friendFolderName
=
get_friend_folder_name
();
LLInventoryModel
::
cat_array_t
*
cats
;
LLInventoryModel
::
item_array_t
*
items
;
gInventory
.
getDirectDescendentsOf
(
parent_id
,
cats
,
items
);
return
findChildFolderUUID
(
callingCardsFolderID
,
friendFolderName
);
if
(
!
cats
||
!
items
||
cats
->
size
()
==
0
)
{
// call failed
return
LLUUID
::
null
;
}
if
(
cats
->
size
()
>
1
)
{
const
LLViewerInventoryCategory
*
friendFolder
=
gInventory
.
getCategory
(
parent_id
);
if
(
friendFolder
)
{
LL_WARNS_ONCE
()
<<
friendFolder
->
getName
()
<<
" folder contains more than one folder"
<<
LL_ENDL
;
}
}
for
(
LLInventoryModel
::
cat_array_t
::
const_iterator
iter
=
cats
->
begin
();
iter
!=
cats
->
end
();
++
iter
)
{
const
LLInventoryCategory
*
category
=
(
*
iter
);
if
(
category
->
getPreferredType
()
==
LLFolderType
::
FT_CALLINGCARD
)
{
return
category
->
getUUID
();
}
}
return
LLUUID
::
null
;
}
const
LLUUID
&
LLFriendCardsManager
::
findFriendAllSubfolderUUIDImpl
()
const
// Inventorry ->
// Calling Cards - >
// Friends - > (the only expected folder)
// All (the only expected folder)
const
LLUUID
&
LLFriendCardsManager
::
findFriendFolderUUIDImpl
()
const
{
LLUUID
friendFolderUUID
=
findFriendFolderUUIDImpl
();
const
LLUUID
callingCardsFolderID
=
gInventory
.
findCategoryUUIDForType
(
LLFolderType
::
FT_CALLINGCARD
);
return
findFirstCallingCardSubfolder
(
callingCardsFolderID
);
}
std
::
string
friendAllSubfolderName
=
get_friend_all_subfolder_name
();
const
LLUUID
&
LLFriendCardsManager
::
findFriendAllSubfolderUUIDImpl
()
const
{
LLUUID
friendFolderUUID
=
findFriendFolderUUIDImpl
();
return
find
ChildF
older
UUID
(
friendFolderUUID
,
friendAllSubfolderName
);
return
find
FirstCallingCardSubf
older
(
friendFolderUUID
);
}
const
LLUUID
&
LLFriendCardsManager
::
findChildFolderUUID
(
const
LLUUID
&
parentFolderUUID
,
const
std
::
string
&
nonLocalizedName
)
const
...
...
This diff is collapsed.
Click to expand it.
indra/newview/llfriendcard.h
+
1
−
0
View file @
855f5390
...
...
@@ -116,6 +116,7 @@ class LLFriendCardsManager
}
const
LLUUID
&
findChildFolderUUID
(
const
LLUUID
&
parentFolderUUID
,
const
std
::
string
&
nonLocalizedName
)
const
;
const
LLUUID
&
findFirstCallingCardSubfolder
(
const
LLUUID
&
parent_id
)
const
;
const
LLUUID
&
findFriendFolderUUIDImpl
()
const
;
const
LLUUID
&
findFriendAllSubfolderUUIDImpl
()
const
;
const
LLUUID
&
findFriendCardInventoryUUIDImpl
(
const
LLUUID
&
avatarID
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment