1
0

Added new AI rules

+ Added new AI rules handling cacti and large heights
* Fixed cIniFile not recognising comments in cIniFile::ReadFile()
* Fixed users.ini not being properly generated
* Changed all instances of (int)floor(GetPosXXX()) to POSXXX_TOINT
This commit is contained in:
Tiger Wang
2014-04-17 18:50:25 +01:00
parent afb20132fe
commit bdea8706d8
7 changed files with 66 additions and 54 deletions

View File

@@ -154,7 +154,7 @@ bool cIniFile::ReadFile(const AString & a_FileName, bool a_AllowExampleRedirect)
case ';':
case '#':
{
if (names.size() == 0)
if (names.empty())
{
AddHeaderComment(line.substr(pLeft + 1));
}
@@ -168,8 +168,9 @@ bool cIniFile::ReadFile(const AString & a_FileName, bool a_AllowExampleRedirect)
} // while (getline())
f.close();
if (names.size() == 0)
if (keys.empty() && names.empty() && comments.empty())
{
// File be empty or unreadable, equivalent to nonexistant
return false;
}