Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Change type of static Lexer::S_* values to public constants

  • Loading branch information...
commit dfcd39dd902f26495bb72587becd259908a0de5b 1 parent 11e8e49
@yiannis authored
Showing with 11 additions and 11 deletions.
  1. +5 −5 Lexer.cc
  2. +6 −6 Lexer.h
View
10 Lexer.cc
@@ -134,8 +134,8 @@ Token Lexer::scanFloat()
}
-float Lexer::S_PI = M_PI;
-float Lexer::S_E = M_E;
-float Lexer::S_LN2 = M_LN2;
-float Lexer::S_LN10 = M_LN10;
-float Lexer::S_0 = 0.0F;
+const float Lexer::S_PI = M_PI;
+const float Lexer::S_E = M_E;
+const float Lexer::S_LN2 = M_LN2;
+const float Lexer::S_LN10 = M_LN10;
+const float Lexer::S_0 = 0.0F;
View
12 Lexer.h
@@ -31,6 +31,12 @@ class Lexer {
std::cout << i->first << ": " << *i->second << "@" << i->second << std::endl;
}
+ static const float S_PI;
+ static const float S_E;
+ static const float S_LN2;
+ static const float S_LN10;
+ static const float S_0;
+
private:
typedef std::map<std::string,const float*>::const_iterator I;
@@ -51,12 +57,6 @@ class Lexer {
Token scan();
Token scanString();
Token scanFloat();
-
- static float S_PI;
- static float S_E;
- static float S_LN2;
- static float S_LN10;
- static float S_0;
};
#endif //LEXER_H
Please sign in to comment.
Something went wrong with that request. Please try again.