Merge with develop

--HG--
branch : compatibility-develop
This commit is contained in:
kervala 2016-02-23 19:42:49 +01:00
commit f8e46962e2

View file

@ -132,22 +132,29 @@ void CCDBSynchronised::read( const string &fileName )
// value
token = strtok(buffer," \t");
if( token == NULL ) continue;
if (token)
{
sint64 value;
fromString((const char*)token, value);
// property name
token = strtok(NULL," \n");
if( token == NULL ) continue;
if (token)
{
string propName(token);
// set the value of the property
ICDBNode::CTextId txtId(propName);
_Database->setProp(txtId, value);
}
}
delete [] buffer;
}
f.close();
} // read //
@ -177,7 +184,6 @@ void CCDBSynchronised::write( const string &fileName )
{
nlwarning("<CCDBSynchronised::write> can't write %s : the database has not been initialized",fileName.c_str());
}
} // write //
@ -285,11 +291,9 @@ string CCDBSynchronised::getString( uint32 id )
{
return (*itStr).second;
}
else
{
nlwarning("<CCDBSynchronised::getString> string with id %d was not found",id);
return "";
}
} // getString //