Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/filesystem/inifile.cc')
-rw-r--r--src/filesystem/inifile.cc18
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);