diff options
author | Stijn Buys <ingar@osirion.org> | 2016-07-12 15:05:50 +0200 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2016-07-12 15:05:50 +0200 |
commit | f2d0bd7a9d98d2dca9226afe1dbe5d1340059680 (patch) | |
tree | c21a8a2a4faead99818acba41a1e6d086cb35370 /src/filesystem | |
parent | 3b990fd97eff35a23d46a135afcd8987f5797e3f (diff) |
Corrected misleading indentation warnings.
Diffstat (limited to 'src/filesystem')
-rw-r--r-- | src/filesystem/inistream.cc | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/filesystem/inistream.cc b/src/filesystem/inistream.cc index 0235440..94cb032 100644 --- a/src/filesystem/inistream.cc +++ b/src/filesystem/inistream.cc @@ -66,17 +66,16 @@ bool IniStream::getline(std::istream & istream) aux::trim(s); line_number++; - if (s.size() == 0) { - // empty line - } else + if (s.size() > 0) { // strip trailing EOL / FF characters - if ( (s[s.size() -1] == 0x0a) || (s[s.size() -1] == 0x0d)) + if ( (s[s.size() -1] == 0x0a) || (s[s.size() -1] == 0x0d)) { s.erase(s.size() -1); + } // comment if (s[0] == '#' || s[0] == ';') { // condebug << "IniStream got comment " << s << std::endl; - } else + } else { // section header if (s.size() > 2 && s[0] == '[' && s[s.size()-1] == ']') { // condebug << "Inifile got section header " << s << std::endl; @@ -107,9 +106,12 @@ bool IniStream::getline(std::istream & istream) } } + } + } return true; - } else + } else { return false; + } } bool IniStream::got_key() const |