mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-04 18:46:37 +00:00
Prefer prefix ++/-- on non-primitive types
Postfix ++/-- might cause the creation of a tmp instance that might be optimized out. Mights are bad. Prefix doesn't have this problem.
This commit is contained in:
+7
-7
@@ -314,7 +314,7 @@ void ChatChannel::SendOPList(Client *c) {
|
||||
|
||||
std::list<std::string>::iterator Iterator;
|
||||
|
||||
for(Iterator = Moderators.begin(); Iterator != Moderators.end(); Iterator++)
|
||||
for(Iterator = Moderators.begin(); Iterator != Moderators.end(); ++Iterator)
|
||||
c->GeneralChannelMessage((*Iterator));
|
||||
|
||||
}
|
||||
@@ -580,7 +580,7 @@ void ChatChannel::RemoveInvitee(std::string Invitee) {
|
||||
|
||||
std::list<std::string>::iterator Iterator;
|
||||
|
||||
for(Iterator = Invitees.begin(); Iterator != Invitees.end(); Iterator++) {
|
||||
for(Iterator = Invitees.begin(); Iterator != Invitees.end(); ++Iterator) {
|
||||
|
||||
if((*Iterator) == Invitee) {
|
||||
|
||||
@@ -597,7 +597,7 @@ bool ChatChannel::IsInvitee(std::string Invitee) {
|
||||
|
||||
std::list<std::string>::iterator Iterator;
|
||||
|
||||
for(Iterator = Invitees.begin(); Iterator != Invitees.end(); Iterator++) {
|
||||
for(Iterator = Invitees.begin(); Iterator != Invitees.end(); ++Iterator) {
|
||||
|
||||
if((*Iterator) == Invitee)
|
||||
return true;
|
||||
@@ -621,7 +621,7 @@ void ChatChannel::RemoveModerator(std::string Moderator) {
|
||||
|
||||
std::list<std::string>::iterator Iterator;
|
||||
|
||||
for(Iterator = Moderators.begin(); Iterator != Moderators.end(); Iterator++) {
|
||||
for(Iterator = Moderators.begin(); Iterator != Moderators.end(); ++Iterator) {
|
||||
|
||||
if((*Iterator) == Moderator) {
|
||||
|
||||
@@ -638,7 +638,7 @@ bool ChatChannel::IsModerator(std::string Moderator) {
|
||||
|
||||
std::list<std::string>::iterator Iterator;
|
||||
|
||||
for(Iterator = Moderators.begin(); Iterator != Moderators.end(); Iterator++) {
|
||||
for(Iterator = Moderators.begin(); Iterator != Moderators.end(); ++Iterator) {
|
||||
|
||||
if((*Iterator) == Moderator)
|
||||
return true;
|
||||
@@ -662,7 +662,7 @@ void ChatChannel::RemoveVoice(std::string inVoiced) {
|
||||
|
||||
std::list<std::string>::iterator Iterator;
|
||||
|
||||
for(Iterator = Voiced.begin(); Iterator != Voiced.end(); Iterator++) {
|
||||
for(Iterator = Voiced.begin(); Iterator != Voiced.end(); ++Iterator) {
|
||||
|
||||
if((*Iterator) == inVoiced) {
|
||||
|
||||
@@ -679,7 +679,7 @@ bool ChatChannel::HasVoice(std::string inVoiced) {
|
||||
|
||||
std::list<std::string>::iterator Iterator;
|
||||
|
||||
for(Iterator = Voiced.begin(); Iterator != Voiced.end(); Iterator++) {
|
||||
for(Iterator = Voiced.begin(); Iterator != Voiced.end(); ++Iterator) {
|
||||
|
||||
if((*Iterator) == inVoiced)
|
||||
return true;
|
||||
|
||||
+9
-9
@@ -190,11 +190,11 @@ std::vector<std::string> ParseRecipients(std::string RecipientString) {
|
||||
|
||||
(*Iterator) = Secret + (*Iterator);
|
||||
|
||||
Iterator++;
|
||||
++Iterator;
|
||||
|
||||
}
|
||||
|
||||
for(Iterator = RecipientList.begin(); Iterator != RecipientList.end(); Iterator++) {
|
||||
for(Iterator = RecipientList.begin(); Iterator != RecipientList.end(); ++Iterator) {
|
||||
|
||||
if((*Iterator).length() > 0) {
|
||||
|
||||
@@ -554,7 +554,7 @@ void Clientlist::CheckForStaleConnections(Client *c) {
|
||||
|
||||
std::list<Client*>::iterator Iterator;
|
||||
|
||||
for(Iterator = ClientChatConnections.begin(); Iterator != ClientChatConnections.end(); Iterator++) {
|
||||
for(Iterator = ClientChatConnections.begin(); Iterator != ClientChatConnections.end(); ++Iterator) {
|
||||
|
||||
if(((*Iterator) != c) && ((c->GetName() == (*Iterator)->GetName())
|
||||
&& (c->GetConnectionType() == (*Iterator)->GetConnectionType()))) {
|
||||
@@ -596,7 +596,7 @@ void Clientlist::Process() {
|
||||
|
||||
std::list<Client*>::iterator Iterator;
|
||||
|
||||
for(Iterator = ClientChatConnections.begin(); Iterator != ClientChatConnections.end(); Iterator++) {
|
||||
for(Iterator = ClientChatConnections.begin(); Iterator != ClientChatConnections.end(); ++Iterator) {
|
||||
|
||||
(*Iterator)->AccountUpdate();
|
||||
if((*Iterator)->ClientStream->CheckClosed()) {
|
||||
@@ -893,7 +893,7 @@ void Clientlist::CloseAllConnections() {
|
||||
|
||||
std::list<Client*>::iterator Iterator;
|
||||
|
||||
for(Iterator = ClientChatConnections.begin(); Iterator != ClientChatConnections.end(); Iterator++) {
|
||||
for(Iterator = ClientChatConnections.begin(); Iterator != ClientChatConnections.end(); ++Iterator) {
|
||||
|
||||
_log(UCS__TRACE, "Removing client %s", (*Iterator)->GetName().c_str());
|
||||
|
||||
@@ -953,7 +953,7 @@ Client *Clientlist::FindCharacter(std::string CharacterName) {
|
||||
|
||||
std::list<Client*>::iterator Iterator;
|
||||
|
||||
for(Iterator = ClientChatConnections.begin(); Iterator != ClientChatConnections.end(); Iterator++) {
|
||||
for(Iterator = ClientChatConnections.begin(); Iterator != ClientChatConnections.end(); ++Iterator) {
|
||||
|
||||
if((*Iterator)->GetName() == CharacterName)
|
||||
return ((*Iterator));
|
||||
@@ -2243,7 +2243,7 @@ Client *Clientlist::IsCharacterOnline(std::string CharacterName) {
|
||||
//
|
||||
std::list<Client*>::iterator Iterator;
|
||||
|
||||
for(Iterator = ClientChatConnections.begin(); Iterator != ClientChatConnections.end(); Iterator++) {
|
||||
for(Iterator = ClientChatConnections.begin(); Iterator != ClientChatConnections.end(); ++Iterator) {
|
||||
|
||||
if(!(*Iterator)->IsMailConnection())
|
||||
continue;
|
||||
@@ -2352,7 +2352,7 @@ void Client::SendFriends() {
|
||||
|
||||
safe_delete(outapp);
|
||||
|
||||
Iterator++;
|
||||
++Iterator;
|
||||
}
|
||||
|
||||
Iterator = Ignorees.begin();
|
||||
@@ -2375,7 +2375,7 @@ void Client::SendFriends() {
|
||||
|
||||
safe_delete(outapp);
|
||||
|
||||
Iterator++;
|
||||
++Iterator;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user