From 09fb43f3d36847977ac202c10c5a11f34af03a43 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Mon, 4 Feb 2008 01:17:44 +0000 Subject: astyle --- src/filesystem/inifile.cc | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'src/filesystem/inifile.cc') 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); -- cgit v1.2.3