diff options
author | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-02-05 02:46:00 +0100 |
---|---|---|
committer | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-02-05 02:46:00 +0100 |
commit | 68ae3c4fd9db8baef4fea99d91766af5bc210506 (patch) | |
tree | b89b138918c97e2b484040e63aa078bc2862b5a2 /src/core/parser/ParserStack.cpp | |
parent | 811477ac1b6fba8f18ea0cc8b2c273da848346a7 (diff) |
Added hasNonWhitepaceChar function
Diffstat (limited to 'src/core/parser/ParserStack.cpp')
-rw-r--r-- | src/core/parser/ParserStack.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/core/parser/ParserStack.cpp b/src/core/parser/ParserStack.cpp index cc875cb..50a97c9 100644 --- a/src/core/parser/ParserStack.cpp +++ b/src/core/parser/ParserStack.cpp @@ -51,11 +51,8 @@ public: void Handler::data(const std::string &data, int field) { - for (auto &c : data) { - if (!Utils::isWhitespace(c)) { - logger().error("Expected command but found character data."); - return; - } + if (Utils::hasNonWhitepaceChar(data)) { + logger().error("Expected command but found character data."); } } |