diff options
Diffstat (limited to 'src/filesystem/inifile.cc')
| -rw-r--r-- | src/filesystem/inifile.cc | 21 | 
1 files changed, 21 insertions, 0 deletions
| diff --git a/src/filesystem/inifile.cc b/src/filesystem/inifile.cc index e9ab283..8cf186c 100644 --- a/src/filesystem/inifile.cc +++ b/src/filesystem/inifile.cc @@ -159,6 +159,17 @@ bool IniFile::got_key_string(const char * keylabel, std::string & valuestring)  	}  } +bool IniFile::got_key_label(const char * keylabel, std::string & labelstring) +{ +	if (last_read_was_key && (key_current.compare(keylabel) == 0)) { +		labelstring.assign(value_current); +		aux::to_label(labelstring); +		return true; +	} else { +		return false; +	} +} +  bool IniFile::got_key_vector3f(const char * keylabel, math::Vector3f & v)  {  	if (last_read_was_key && (key_current.compare(keylabel) == 0)) { @@ -298,6 +309,16 @@ void IniFile::unknown_section() const  	con_warn << name() << " unknown section '" << section() << "' at line " << line() << std::endl;  } +void IniFile::unknown_error(const char *text) const +{ +	con_warn << name() << " " << (text && text[0] ? text : "unknown error") << " at line " << line() << std::endl; +} + +void IniFile::unknown_error(const std::string &text) const +{ +	con_warn << name() << " " << text << " at line " << line() << std::endl; +} +  void IniFile::close()  {  	inifile_stream.close(); | 
