From: Wintermate Date: Tue, 22 Oct 2013 12:32:48 +0000 (+0200) Subject: Level-Konverter: Leerzeichen am Ende von Optionszeilen trimmen. X-Git-Url: https://git.rohieb.name/hackover2013-badge-firmware.git/commitdiff_plain/a5be9eb1faa85fd314105544959f1a378e901de5?hp=a4e373da35b19a2726275f7068599830d8de5ca2 Level-Konverter: Leerzeichen am Ende von Optionszeilen trimmen. --- diff --git a/mock/tools/level-converter.cc b/mock/tools/level-converter.cc index eccd3e0..88e9315 100644 --- a/mock/tools/level-converter.cc +++ b/mock/tools/level-converter.cc @@ -6,6 +6,7 @@ extern "C" { } #include +#include #include #include @@ -77,7 +78,7 @@ namespace jnrcpp { std::string name; while(std::getline(in, name)) { - if(name != "") { + if(boost::trim_copy(name) != "") { names.push_back(name); } } @@ -119,7 +120,7 @@ namespace jnrcpp { } else { throw std::invalid_argument("Unkown type: " + line); } - } else if(line != "") { + } else if(boost::trim_right_copy(line) != "") { char c; std::string tok; std::istringstream parser(line);