Fixed const iterator issue and something with the string utils.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/uni@13619 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
unitraxx
2013-09-02 23:22:10 +00:00
parent 56de36925c
commit c0c744b45b
3 changed files with 7 additions and 5 deletions

View File

@@ -78,7 +78,7 @@ MapAchievementInfo::MapAchievementInfo(const XMLNode * input)
bool MapAchievementInfo::checkCompletion(Achievement * achievement) const
{
MapAchievement * map_achievement = (MapAchievement *) achievement;
std::map<std::string, int>::iterator iter;
std::map<std::string, int>::const_iterator iter;
for ( iter = m_goal_values.begin(); iter != m_goal_values.end(); iter++ ) {
if(map_achievement->getValue(iter->first) < iter->second)
return false;

View File

@@ -709,6 +709,11 @@ namespace StringUtils
printf("Invalid version string '%s'.\n", s.c_str());
return version;
} // versionToInt
const char* boolstr(bool b)
{
return (b ? "true" : "false");
}
} // namespace StringUtils

View File

@@ -414,10 +414,7 @@ namespace StringUtils
/** Compute a simple hash of a string */
unsigned int simpleHash(const char* input);
const char* boolstr(bool b)
{
return (b ? "true" : "false");
}
const char* boolstr(bool b);
} // namespace StringUtils
#endif