diff options
author | Stijn Buys <ingar@osirion.org> | 2008-02-04 01:17:44 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-02-04 01:17:44 +0000 |
commit | 09fb43f3d36847977ac202c10c5a11f34af03a43 (patch) | |
tree | 45f4537347e9f8b3195cea00356963e9879a08fa /src/filesystem/inifile.cc | |
parent | 840f9b8678f607aecc15d47bc77248c4ac8b8574 (diff) |
astyle
Diffstat (limited to 'src/filesystem/inifile.cc')
-rw-r--r-- | src/filesystem/inifile.cc | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/filesystem/inifile.cc b/src/filesystem/inifile.cc index 57778b3..f04d116 100644 --- a/src/filesystem/inifile.cc +++ b/src/filesystem/inifile.cc @@ -7,13 +7,15 @@ // project headers #include "filesystem/inifile.h" -namespace filesystem { +namespace filesystem +{ IniFile::IniFile() {} IniFile::~IniFile() {} -void IniFile::open(const char * filename, std::ios_base::openmode mode) { +void IniFile::open(const char * filename, std::ios_base::openmode mode) +{ last_read_was_section = false; last_read_was_key = false; key_current = ""; @@ -25,15 +27,18 @@ void IniFile::open(const char * filename, std::ios_base::openmode mode) { } -bool IniFile::got_section() const { +bool IniFile::got_section() const +{ return last_read_was_section; } -bool IniFile::got_section(const char * sectionlabel) const { +bool IniFile::got_section(const char * sectionlabel) const +{ return (last_read_was_section && section_current == sectionlabel); } -IniFile & IniFile::getline() { +IniFile & IniFile::getline() +{ char line[1024]; last_read_was_section = false; @@ -79,7 +84,8 @@ IniFile & IniFile::getline() { return (*this); } -bool IniFile::got_key_string(char * const keylabel, std::string & valuestring) { +bool IniFile::got_key_string(char * const keylabel, std::string & valuestring) +{ //condebug << "IniFile got_value_string " << keylabel << " " << last_read_was_key << std::endl; if (last_read_was_key && key_current == keylabel) { valuestring.assign(value_current); |