1
0

Suggestions

This commit is contained in:
Tiger Wang
2014-06-05 17:58:29 +01:00
parent b73bf1a1e3
commit 156c9851b8
7 changed files with 36 additions and 14 deletions

View File

@@ -447,6 +447,15 @@ bool cIniFile::SetValueI(const AString & a_KeyName, const AString & a_ValueName,
bool cIniFile::SetValueI(const AString & a_Keyname, const AString & a_ValueName, const Int64 a_Value, const bool a_CreateIfNotExists)
{
return SetValue(a_Keyname, a_ValueName, Printf("lld", a_Value), a_CreateIfNotExists);
}
bool cIniFile::SetValueF(const AString & a_KeyName, const AString & a_ValueName, double const a_Value, const bool a_CreateIfNotExists)
{
return SetValue(a_KeyName, a_ValueName, Printf("%f", a_Value), a_CreateIfNotExists);
@@ -571,6 +580,17 @@ int cIniFile::GetValueSetI(const AString & keyname, const AString & valuename, c
Int64 cIniFile::GetValueSetI(const AString & keyname, const AString & valuename, const Int64 defValue)
{
AString Data;
Printf(Data, "%lld", defValue);
return std::stoll(GetValueSet(keyname, valuename, Data));
}
bool cIniFile::DeleteValueByID(const int keyID, const int valueID)
{
if ((keyID < (int)keys.size()) && (valueID < (int)keys[keyID].names.size()))