mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-07-06 08:57:11 +02:00
Fixed the INI compilation on Linux by reverting to the original library.
Fixed an infinite loop in the parsing of command specification strings. Added the option to retrieve common configs with a fall back value if they don't exist. Few other minor changes.
This commit is contained in:
@ -345,13 +345,21 @@ void Core::Terminate()
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
CSStr Core::GetOption(const String & name) const
|
||||
CSStr Core::GetOption(CSStr name) const
|
||||
{
|
||||
Options::const_iterator elem = m_Options.find(name);
|
||||
return (elem == m_Options.end()) ? g_EmptyStr : elem->second.c_str();
|
||||
return (elem == m_Options.end()) ? _SC("") : elem->second.c_str();
|
||||
}
|
||||
|
||||
void Core::SetOption(const String & name, const String & value)
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
CSStr Core::GetOption(CSStr name, CSStr value) const
|
||||
{
|
||||
Options::const_iterator elem = m_Options.find(name);
|
||||
return (elem == m_Options.end()) ? value : elem->second.c_str();
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void Core::SetOption(CSStr name, CSStr value)
|
||||
{
|
||||
m_Options[name] = value;
|
||||
}
|
||||
|
Reference in New Issue
Block a user