Author: silene
Date: Mon Mar 30 23:33:24 2009
New Revision: 34306
URL: http://svn.gna.org/viewcvs/wesnoth?rev=34306&view=rev
Log:
Removed some bloat.
Modified:
trunk/src/ai_manager.cpp
Modified: trunk/src/ai_manager.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/ai_manager.cpp?rev=34306&r1=34305&r2=34306&view=diff
==============================================================================
--- trunk/src/ai_manager.cpp (original)
+++ trunk/src/ai_manager.cpp Mon Mar 30 23:33:24 2009
@@ -388,14 +388,14 @@
} else if (cmd.size()==1){
if (cmd.at(0)=="!help") {
return
- std::string("known commands:\n")+
- std::string("! - repeat last command (? and
! do not count)\n")+
- std::string("! NUMBER - repeat numbered
command\n")+
- std::string("? - show a history list\n")+
- std::string("!add_ai TEAM FILE - add a AI to
team (0 - command AI, N - AI for team #N) from file\n")+
- std::string("!remove_ai TEAM - remove AI
from team (0 - command AI, N - AI for team #N)\n")+
- std::string("!replace_ai TEAM FILE - replace
AI of team (0 - command AI, N - AI for team #N) from file\n")+
- std::string("!help - show this help
message");
+ "known commands:\n"
+ "! - repeat last command (? and ! do not
count)\n"
+ "! NUMBER - repeat numbered command\n"
+ "? - show a history list\n"
+ "!add_ai TEAM FILE - add a AI to team (0 -
command AI, N - AI for team #N) from file\n"
+ "!remove_ai TEAM - remove AI from team (0 -
command AI, N - AI for team #N)\n"
+ "!replace_ai TEAM FILE - replace AI of team
(0 - command AI, N - AI for team #N) from file\n"
+ "!help - show this help message";
}
}
@@ -485,7 +485,7 @@
return new ai2(i);
}
- if(ai_algorithm_type != "" && ai_algorithm_type !=
ai_manager::AI_TYPE_DEFAULT) {
+ if (!ai_algorithm_type.empty() && ai_algorithm_type !=
ai_manager::AI_TYPE_DEFAULT) {
ERR_AI_MANAGER << "AI not found: [" << ai_algorithm_type << "].
Using default instead.\n";
}
@@ -618,7 +618,7 @@
if (iter!=ai_map_.end()){
return iter->second;
}
- return ai_map_.insert( std::make_pair<int, std::stack< ai_holder >
>(team,std::stack< ai_holder >()) ).first->second;
+ return ai_map_.insert(std::pair<int, std::stack<ai_holder> >(team,
std::stack<ai_holder>())).first->second;
}
// =======================================================================
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits