mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-04 10:26: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:
@@ -121,7 +121,7 @@ int main(int argc, char *argv[]) {
|
||||
*/
|
||||
zone = zones.begin();
|
||||
zend = zones.end();
|
||||
for(; zone != zend; zone++) {
|
||||
for(; zone != zend; ++zone) {
|
||||
if(!zone->second->Process())
|
||||
to_remove.insert(zone->first);
|
||||
}
|
||||
@@ -159,7 +159,7 @@ int main(int argc, char *argv[]) {
|
||||
//try to be semi-nice about this... without waiting too long
|
||||
zone = zones.begin();
|
||||
zend = zones.end();
|
||||
for(; zone != zend; zone++) {
|
||||
for(; zone != zend; ++zone) {
|
||||
zone->second->Stop();
|
||||
}
|
||||
Sleep(1);
|
||||
@@ -169,7 +169,7 @@ int main(int argc, char *argv[]) {
|
||||
launch->Process();
|
||||
//kill anybody left
|
||||
launch->TerminateAll(true);
|
||||
for(; zone != zend; zone++) {
|
||||
for(; zone != zend; ++zone) {
|
||||
delete zone->second;
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ void WorldServer::OnConnected() {
|
||||
std::map<std::string, ZoneLaunch *>::iterator cur, end;
|
||||
cur = m_zones.begin();
|
||||
end = m_zones.end();
|
||||
for(; cur != end; cur++) {
|
||||
for(; cur != end; ++cur) {
|
||||
cur->second->SendStatus();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user