summaryrefslogtreecommitdiff
path: root/indra/newview/llgroupmgr.cpp
diff options
context:
space:
mode:
authorAnsariel <ansariel.hiller@phoenixviewer.com>2024-02-21 21:05:14 +0100
committerAndrey Lihatskiy <alihatskiy@productengine.com>2024-02-21 23:14:31 +0200
commit60d3dd98a44230c21803c1606552ee098ed9fa7c (patch)
treeaf0aa11c458ca86f786560e0875f7e018e1a16b9 /indra/newview/llgroupmgr.cpp
parent855eea7ddf9e1de9226036ca94ccb03ac0e311b9 (diff)
Convert remaining BOOL to bool
Diffstat (limited to 'indra/newview/llgroupmgr.cpp')
-rw-r--r--indra/newview/llgroupmgr.cpp90
1 files changed, 45 insertions, 45 deletions
diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp
index 5683a690f1..6aba2ca0da 100644
--- a/indra/newview/llgroupmgr.cpp
+++ b/indra/newview/llgroupmgr.cpp
@@ -93,7 +93,7 @@ LLGroupMemberData::LLGroupMemberData(const LLUUID& id,
U64 agent_powers,
const std::string& title,
const std::string& online_status,
- BOOL is_owner) :
+ bool is_owner) :
mID(id),
mContribution(contribution),
mAgentPowers(agent_powers),
@@ -137,7 +137,7 @@ LLGroupRoleData::LLGroupRoleData(const LLUUID& role_id,
const S32 member_count) :
mRoleID(role_id),
mMemberCount(member_count),
- mMembersNeedsSort(FALSE)
+ mMembersNeedsSort(false)
{
mRoleData.mRoleName = role_name;
mRoleData.mRoleTitle = role_title;
@@ -152,7 +152,7 @@ LLGroupRoleData::LLGroupRoleData(const LLUUID& role_id,
mRoleID(role_id),
mRoleData(role_data),
mMemberCount(member_count),
- mMembersNeedsSort(FALSE)
+ mMembersNeedsSort(false)
{
}
@@ -162,7 +162,7 @@ LLGroupRoleData::~LLGroupRoleData()
}
S32 LLGroupRoleData::getMembersInRole(uuid_vec_t members,
- BOOL needs_sort)
+ bool needs_sort)
{
if (mRoleID.isNull())
{
@@ -175,7 +175,7 @@ S32 LLGroupRoleData::getMembersInRole(uuid_vec_t members,
if (mMembersNeedsSort)
{
std::sort(mMemberIDs.begin(), mMemberIDs.end());
- mMembersNeedsSort = FALSE;
+ mMembersNeedsSort = false;
}
if (needs_sort)
{
@@ -195,7 +195,7 @@ S32 LLGroupRoleData::getMembersInRole(uuid_vec_t members,
void LLGroupRoleData::addMember(const LLUUID& member)
{
- mMembersNeedsSort = TRUE;
+ mMembersNeedsSort = true;
mMemberIDs.push_back(member);
}
@@ -205,7 +205,7 @@ bool LLGroupRoleData::removeMember(const LLUUID& member)
if (it != mMemberIDs.end())
{
- mMembersNeedsSort = TRUE;
+ mMembersNeedsSort = true;
mMemberIDs.erase(it);
return true;
}
@@ -215,7 +215,7 @@ bool LLGroupRoleData::removeMember(const LLUUID& member)
void LLGroupRoleData::clearMembers()
{
- mMembersNeedsSort = FALSE;
+ mMembersNeedsSort = false;
mMemberIDs.clear();
}
@@ -226,13 +226,13 @@ void LLGroupRoleData::clearMembers()
LLGroupMgrGroupData::LLGroupMgrGroupData(const LLUUID& id) :
mID(id),
- mShowInList(TRUE),
- mOpenEnrollment(FALSE),
+ mShowInList(true),
+ mOpenEnrollment(false),
mMembershipFee(0),
- mAllowPublish(FALSE),
- mListInProfile(FALSE),
- mMaturePublish(FALSE),
- mChanged(FALSE),
+ mAllowPublish(false),
+ mListInProfile(false),
+ mMaturePublish(false),
+ mChanged(false),
mMemberCount(0),
mRoleCount(0),
mReceivedRoleMemberPairs(0),
@@ -252,7 +252,7 @@ void LLGroupMgrGroupData::setAccessed()
mAccessTime = (F32)LLFrameTimer::getTotalSeconds();
}
-BOOL LLGroupMgrGroupData::getRoleData(const LLUUID& role_id, LLRoleData& role_data)
+bool LLGroupMgrGroupData::getRoleData(const LLUUID& role_id, LLRoleData& role_data)
{
role_data_map_t::const_iterator it;
@@ -260,10 +260,10 @@ BOOL LLGroupMgrGroupData::getRoleData(const LLUUID& role_id, LLRoleData& role_da
it = mRoleChanges.find(role_id);
if (it != mRoleChanges.end())
{
- if ((*it).second.mChangeType == RC_DELETE) return FALSE;
+ if ((*it).second.mChangeType == RC_DELETE) return false;
role_data = (*it).second;
- return TRUE;
+ return true;
}
// Ok, no changes, hasn't been deleted, isn't a new role, just find the role.
@@ -271,11 +271,11 @@ BOOL LLGroupMgrGroupData::getRoleData(const LLUUID& role_id, LLRoleData& role_da
if (rit != mRoles.end())
{
role_data = (*rit).second->getRoleData();
- return TRUE;
+ return true;
}
// This role must not exist.
- return FALSE;
+ return false;
}
@@ -337,7 +337,7 @@ void LLGroupMgrGroupData::setRoleData(const LLUUID& role_id, LLRoleData role_dat
}
}
-BOOL LLGroupMgrGroupData::pendingRoleChanges()
+bool LLGroupMgrGroupData::pendingRoleChanges()
{
return (!mRoleChanges.empty());
}
@@ -517,7 +517,7 @@ bool LLGroupMgrGroupData::changeRoleMember(const LLUUID& role_id,
//TODO move this into addrole function
//see if they added someone to the owner role and update isOwner
- gmd->mIsOwner = (role_id == mOwnerRole) ? TRUE : gmd->mIsOwner;
+ gmd->mIsOwner = (role_id == mOwnerRole) ? true : gmd->mIsOwner;
}
else if (RMC_REMOVE == rmc)
{
@@ -526,7 +526,7 @@ bool LLGroupMgrGroupData::changeRoleMember(const LLUUID& role_id,
gmd->removeRole(role_id);
//see if they removed someone from the owner role and update isOwner
- gmd->mIsOwner = (role_id == mOwnerRole) ? FALSE : gmd->mIsOwner;
+ gmd->mIsOwner = (role_id == mOwnerRole) ? false : gmd->mIsOwner;
}
lluuid_pair role_member;
@@ -568,7 +568,7 @@ bool LLGroupMgrGroupData::changeRoleMember(const LLUUID& role_id,
recalcAgentPowers(member_id);
- mChanged = TRUE;
+ mChanged = true;
return true;
}
@@ -1049,7 +1049,7 @@ void LLGroupMgr::processGroupMembersReply(LLMessageSystem* msg, void** data)
}
}
- group_datap->mChanged = TRUE;
+ group_datap->mChanged = true;
LLGroupMgr::getInstance()->notifyObservers(GC_MEMBER_DATA);
}
@@ -1122,7 +1122,7 @@ void LLGroupMgr::processGroupPropertiesReply(LLMessageSystem* msg, void** data)
group_datap->mRoleCount = num_group_roles + 1; // Add the everyone role.
group_datap->mGroupPropertiesDataComplete = true;
- group_datap->mChanged = TRUE;
+ group_datap->mChanged = true;
properties_request_map_t::iterator request = LLGroupMgr::getInstance()->mPropRequests.find(group_id);
if (request != LLGroupMgr::getInstance()->mPropRequests.end())
@@ -1219,7 +1219,7 @@ void LLGroupMgr::processGroupRoleDataReply(LLMessageSystem* msg, void** data)
}
}
- group_datap->mChanged = TRUE;
+ group_datap->mChanged = true;
LLGroupMgr::getInstance()->notifyObservers(GC_ROLE_DATA);
}
@@ -1329,7 +1329,7 @@ void LLGroupMgr::processGroupRoleMembersReply(LLMessageSystem* msg, void** data)
group_datap->mRoleMembersRequestID.setNull();
}
- group_datap->mChanged = TRUE;
+ group_datap->mChanged = true;
LLGroupMgr::getInstance()->notifyObservers(GC_ROLE_MEMBER_DATA);
if (group_datap->mPendingBanRequest)
@@ -1379,7 +1379,7 @@ void LLGroupMgr::processGroupTitlesReply(LLMessageSystem* msg, void** data)
}
}
- group_datap->mChanged = TRUE;
+ group_datap->mChanged = true;
LLGroupMgr::getInstance()->notifyObservers(GC_TITLES);
}
@@ -1460,8 +1460,8 @@ void LLGroupMgr::processCreateGroupReply(LLMessageSystem* msg, void ** data)
// This is so when we go to modify the group we will be able to do so.
// This isn't actually too bad because real data will come down in 2 or 3 miliseconds and replace this.
LLGroupData gd;
- gd.mAcceptNotices = TRUE;
- gd.mListInProfile = TRUE;
+ gd.mAcceptNotices = true;
+ gd.mListInProfile = true;
gd.mContribution = 0;
gd.mID = group_id;
gd.mName = "new group";
@@ -1546,7 +1546,7 @@ void LLGroupMgr::notifyObservers(LLGroupChange gc)
{
oi->second->changed(gc);
}
- gi->second->mChanged = FALSE;
+ gi->second->mChanged = false;
// notify LLParticularGroupObserver
@@ -1685,7 +1685,7 @@ void LLGroupMgr::sendGroupRoleMembersRequest(const LLUUID& group_id)
LL_INFOS("GrpMgr") << " Pending: " << (group_datap->mPendingRoleMemberRequest ? "Y" : "N")
<< " MemberDataComplete: " << (group_datap->mMemberDataComplete ? "Y" : "N")
<< " RoleDataComplete: " << (group_datap->mRoleDataComplete ? "Y" : "N") << LL_ENDL;
- group_datap->mPendingRoleMemberRequest = TRUE;
+ group_datap->mPendingRoleMemberRequest = true;
return;
}
@@ -1744,11 +1744,11 @@ void LLGroupMgr::sendGroupTitleUpdate(const LLUUID& group_id, const LLUUID& titl
{
if (iter->mRoleID == title_role_id)
{
- iter->mSelected = TRUE;
+ iter->mSelected = true;
}
else if (iter->mSelected)
{
- iter->mSelected = FALSE;
+ iter->mSelected = false;
}
}
}
@@ -1759,9 +1759,9 @@ void LLGroupMgr::sendCreateGroupRequest(const std::string& name,
U8 show_in_list,
const LLUUID& insignia,
S32 membership_fee,
- BOOL open_enrollment,
- BOOL allow_publish,
- BOOL mature_publish)
+ bool open_enrollment,
+ bool allow_publish,
+ bool mature_publish)
{
LLMessageSystem* msg = gMessageSystem;
msg->newMessage("CreateGroupRequest");
@@ -1807,7 +1807,7 @@ void LLGroupMgr::sendUpdateGroupInfo(const LLUUID& group_id)
gAgent.sendReliableMessage();
// Not expecting a response, so let anyone else watching know the data has changed.
- group_datap->mChanged = TRUE;
+ group_datap->mChanged = true;
notifyObservers(GC_PROPERTIES);
}
@@ -1853,7 +1853,7 @@ void LLGroupMgr::sendGroupRoleMemberChanges(const LLUUID& group_id)
group_datap->mRoleMemberChanges.clear();
// Not expecting a response, so let anyone else watching know the data has changed.
- group_datap->mChanged = TRUE;
+ group_datap->mChanged = true;
notifyObservers(GC_ROLE_MEMBER_DATA);
}
@@ -2147,7 +2147,7 @@ void LLGroupMgr::processGroupBanRequest(const LLSD& content)
gdatap->createBanEntry(ban_id, ban_data);
}
- gdatap->mChanged = TRUE;
+ gdatap->mChanged = true;
LLGroupMgr::getInstance()->notifyObservers(GC_BANLIST);
}
@@ -2251,7 +2251,7 @@ void LLGroupMgr::processCapGroupMembersRequest(const LLSD& content)
LL_INFOS("GrpMgr") << "Received empty group members list for group id: " << group_id.asString() << LL_ENDL;
// Set mMemberDataComplete for correct handling of empty responses. See MAINT-5237
group_datap->mMemberDataComplete = true;
- group_datap->mChanged = TRUE;
+ group_datap->mChanged = true;
LLGroupMgr::getInstance()->notifyObservers(GC_MEMBER_DATA);
return;
}
@@ -2267,7 +2267,7 @@ void LLGroupMgr::processCapGroupMembersRequest(const LLSD& content)
S32 contribution;
U64 member_powers;
// If this is changed to a bool, make sure to change the LLGroupMemberData constructor
- BOOL is_owner;
+ bool is_owner;
// Compute this once, rather than every time.
U64 default_powers = llstrtou64(defaults["default_powers"].asString().c_str(), NULL, 16);
@@ -2355,7 +2355,7 @@ void LLGroupMgr::processCapGroupMembersRequest(const LLSD& content)
sendGroupRoleMembersRequest(group_id);
}
- group_datap->mChanged = TRUE;
+ group_datap->mChanged = true;
notifyObservers(GC_MEMBER_DATA);
}
@@ -2371,7 +2371,7 @@ void LLGroupMgr::sendGroupRoleChanges(const LLUUID& group_id)
group_datap->sendRoleChanges();
// Not expecting a response, so let anyone else watching know the data has changed.
- group_datap->mChanged = TRUE;
+ group_datap->mChanged = true;
notifyObservers(GC_ROLE_DATA);
}
}
@@ -2389,7 +2389,7 @@ bool LLGroupMgr::parseRoleActions(const std::string& xml_filename)
{
LLXMLNodePtr root;
- BOOL success = LLUICtrlFactory::getLayeredXMLNode(xml_filename, root);
+ bool success = LLUICtrlFactory::getLayeredXMLNode(xml_filename, root);
if (!success || !root || !root->hasName( "role_actions" ))
{