LLGroupMgr Don't copy vectors around, we can use references

getMembersInRole with needs_sort will now sort the vector passed in
At the moment it's not used with this being true so it doesn't matter
Just take note.
This commit is contained in:
Lirusaito
2019-04-09 02:08:25 -04:00
parent 6397261a33
commit 181c6ddd9d
2 changed files with 4 additions and 4 deletions

View File

@@ -160,7 +160,7 @@ LLGroupRoleData::~LLGroupRoleData()
{
}
S32 LLGroupRoleData::getMembersInRole(uuid_vec_t members,
S32 LLGroupRoleData::getMembersInRole(uuid_vec_t& members,
BOOL needs_sort)
{
if (mRoleID.isNull())
@@ -2083,7 +2083,7 @@ void GroupBanDataResponder::httpSuccess()
void LLGroupMgr::sendGroupBanRequest( EBanRequestType request_type,
const LLUUID& group_id,
U32 ban_action, /* = BAN_NO_ACTION */
const uuid_vec_t ban_list) /* = uuid_vec_t() */
const uuid_vec_t& ban_list) /* = uuid_vec_t() */
{
LLViewerRegion* currentRegion = gAgent.getRegion();
if (!currentRegion)

View File

@@ -148,7 +148,7 @@ public:
const LLUUID& getID() const { return mRoleID; }
const uuid_vec_t& getRoleMembers() const { return mMemberIDs; }
S32 getMembersInRole(uuid_vec_t members, BOOL needs_sort = TRUE);
S32 getMembersInRole(uuid_vec_t& members, BOOL needs_sort = TRUE);
S32 getTotalMembersInRole() { return mMemberCount ? mMemberCount : mMemberIDs.size(); } //FIXME: Returns 0 for Everyone role when Member list isn't yet loaded, see MAINT-5225
LLRoleData getRoleData() const { return mRoleData; }
@@ -401,7 +401,7 @@ public:
static void sendGroupBanRequest(EBanRequestType request_type,
const LLUUID& group_id,
U32 ban_action = BAN_NO_ACTION,
const uuid_vec_t ban_list = uuid_vec_t());
const uuid_vec_t& ban_list = uuid_vec_t());
static void processGroupBanRequest(const LLSD& content);