Changeset 1119
- Timestamp:
- Apr 20, 2008, 7:21:53 PM (17 years ago)
- Location:
- code/branches/input/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/input/src/orxonox/Orxonox.cc
r1118 r1119 128 128 { 129 129 public: 130 static void calculate( std::stringcalculation)130 static void calculate(const std::string& calculation) 131 131 { 132 132 ExprParser expr(calculation); -
code/branches/input/src/util/ExprParser.cc
r1118 r1119 44 44 #define PARSE_BLANKS while (*reading_stream == ' ') ++reading_stream; 45 45 46 ExprParser::ExprParser( std::string& str)46 ExprParser::ExprParser(const std::string& str) 47 47 { 48 48 this->failed_ = false; … … 234 234 PARSE_BLANKS 235 235 double value; 236 236 237 237 unary_operator op = parse_unary_operator(); 238 238 PARSE_BLANKS … … 299 299 value = ceil(parse_last_argument()); 300 300 CASE("abs") 301 value = abs(parse_last_argument());301 value = fabs(parse_last_argument()); 302 302 CASE("exp") 303 303 value = exp(parse_last_argument()); … … 364 364 return 0; 365 365 } 366 366 367 367 PARSE_BLANKS 368 368 switch (op) -
code/branches/input/src/util/ExprParser.h
r1118 r1119 65 65 u_plus, 66 66 u_minus, 67 u_nicht 67 u_nicht 68 68 }; 69 69 70 70 71 ExprParser( std::string& str);71 ExprParser(const std::string& str); 72 72 std::string& getRemains() { return this->remains_; } 73 73 double getResult() { return this->result_; }
Note: See TracChangeset
for help on using the changeset viewer.