Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1119 for code/branches/input


Ignore:
Timestamp:
Apr 20, 2008, 7:21:53 PM (17 years ago)
Author:
landauf
Message:

small fix

Location:
code/branches/input/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/input/src/orxonox/Orxonox.cc

    r1118 r1119  
    128128  {
    129129  public:
    130     static void calculate(std::string calculation)
     130    static void calculate(const std::string& calculation)
    131131    {
    132132      ExprParser expr(calculation);
  • code/branches/input/src/util/ExprParser.cc

    r1118 r1119  
    4444#define PARSE_BLANKS while (*reading_stream == ' ') ++reading_stream;
    4545
    46 ExprParser::ExprParser(std::string& str)
     46ExprParser::ExprParser(const std::string& str)
    4747{
    4848  this->failed_ = false;
     
    234234   PARSE_BLANKS
    235235   double value;
    236    
     236
    237237   unary_operator op = parse_unary_operator();
    238238   PARSE_BLANKS
     
    299299            value = ceil(parse_last_argument());
    300300         CASE("abs")
    301             value = abs(parse_last_argument());
     301            value = fabs(parse_last_argument());
    302302         CASE("exp")
    303303            value = exp(parse_last_argument());
     
    364364     return 0;
    365365   }
    366  
     366
    367367   PARSE_BLANKS
    368368   switch (op)
  • code/branches/input/src/util/ExprParser.h

    r1118 r1119  
    6565    u_plus,
    6666    u_minus,
    67     u_nicht 
     67    u_nicht
    6868  };
    6969
    7070
    71   ExprParser(std::string& str);
     71  ExprParser(const std::string& str);
    7272  std::string& getRemains() { return  this->remains_; }
    7373  double       getResult()  { return  this->result_; }
Note: See TracChangeset for help on using the changeset viewer.