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:
Michael Cook (mackal)
2014-01-13 22:14:02 -05:00
parent 47c33f3b31
commit 4216627604
51 changed files with 405 additions and 426 deletions
+3 -3
View File
@@ -177,7 +177,7 @@ uint8 *ZoneGuildManager::MakeGuildMembers(uint32 guild_id, const char *prefix_na
end = members.end();
uint32 name_len = 0;
uint32 note_len = 0;
for(; cur != end; cur++) {
for(; cur != end; ++cur) {
ci = *cur;
name_len += ci->char_name.length();
note_len += ci->public_note.length();
@@ -205,7 +205,7 @@ uint8 *ZoneGuildManager::MakeGuildMembers(uint32 guild_id, const char *prefix_na
cur = members.begin();
end = members.end();
for(; cur != end; cur++) {
for(; cur != end; ++cur) {
ci = *cur;
//the order we set things here must match the struct
@@ -247,7 +247,7 @@ void ZoneGuildManager::ListGuilds(Client *c) const {
cur = m_guilds.begin();
end = m_guilds.end();
int r = 0;
for(; cur != end; cur++) {
for(; cur != end; ++cur) {
leadername[0] = '\0';
database.GetCharName(cur->second->leader_char_id, leadername);
if (leadername[0] == '\0')