- Timestamp:
- Dec 25, 2009, 10:23:58 PM (15 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/libraries/core/ConsoleCommandCompilation.cc
r6105 r6417 35 35 #include "util/Debug.h" 36 36 #include "util/ExprParser.h" 37 #include "util/StringUtils.h" 37 38 #include "ConsoleCommand.h" 38 39 … … 142 143 } 143 144 144 std::string output = "";145 std::string output; 145 146 while (file.good() && !file.eof()) 146 147 { … … 158 159 float calculate(const std::string& calculation) 159 160 { 160 ExprParser expr(calculation); 161 ExprParser expr; 162 expr.parse(calculation); 161 163 if (expr.getSuccess()) 162 164 { … … 165 167 COUT(3) << "Greetings from the restaurant at the end of the universe." << std::endl; 166 168 } 167 if ( expr.getRemains() != "")169 if (!expr.getRemains().empty()) 168 170 { 169 COUT(2) << "Warning: Expression could not be parsed to the end! Remains: '" << expr.getRemains() << "'"<< std::endl;171 COUT(2) << "Warning: Expression could not be parsed to the end! Remains: '" << expr.getRemains() << '\'' << std::endl; 170 172 } 171 173 return static_cast<float>(expr.getResult());
Note: See TracChangeset
for help on using the changeset viewer.