mirror of
https://github.com/electronicarts/CNC_TS_and_RA2_Mission_Editor.git
synced 2025-07-17 19:56:38 -04:00
added float parse support .
This commit is contained in:
parent
d4a58864ff
commit
7d80e89afb
3 changed files with 112 additions and 77 deletions
|
@ -108,6 +108,10 @@ public:
|
|||
return INIHelper::StringToInteger(this->GetString(key), def);
|
||||
}
|
||||
|
||||
float GetFloat(const CString& key, float def = 0.0) const {
|
||||
return INIHelper::StringToFloat(this->GetString(key), def);
|
||||
}
|
||||
|
||||
bool GetBool(const CString& key, bool def = false) const {
|
||||
auto const& str = this->GetString(key);
|
||||
return INIHelper::StringToBool(str, def);
|
||||
|
@ -310,6 +314,9 @@ public:
|
|||
void SetBool(const CString& section, const CString& key, const bool value) {
|
||||
this->SetString(section, key, INIHelper::ToString(value));
|
||||
}
|
||||
void SetInteger(const CString& section, const CString& key, const bool value) {
|
||||
this->SetString(section, key, INIHelper::ToString(value));
|
||||
}
|
||||
|
||||
void RemoveValueByKey(const CString& section, const CString& key) {
|
||||
if (auto pSec = this->TryGetSection(section)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue