Commit 8744516e authored by Jan Holthuis's avatar Jan Holthuis
Browse files

cfg: Remove redundant code

parent 87f7ca0b
......@@ -276,22 +276,9 @@ s32 ConfigFile::Exists(const wchar * Section, const wchar * Key)
}
void ConfigFile::LoadStr(const wchar * Section, const wchar * Key, wchar * Return,const wchar* Default)
{
verify(Section!=0 && strlen(Section)!=0);
verify(Key!=0 && strlen(Key)!=0);
verify(Return!=0);
if (Default==0)
Default="";
ConfigSection* cs= this->GetEntry(Section);
ConfigEntry* ce=cs->FindEntry(Key);
if (!ce)
{
cs->SetEntry(Key,Default,CEM_SAVE);
strcpy(Return,Default);
}
else
{
strcpy(Return,ce->GetValue().c_str());
}
string value = this->LoadStr(Section, Key, Default);
strcpy(Return, value.c_str());
}
string ConfigFile::LoadStr(const wchar * Section, const wchar * Key, const wchar* Default)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment