Lexer: Improved CppCoreGuidelines compliance

This commit is contained in:
Paul Beckingham 2016-01-19 00:41:30 -05:00
parent 672666593b
commit 3b402e5f49
2 changed files with 4 additions and 5 deletions

View file

@ -34,7 +34,6 @@
////////////////////////////////////////////////////////////////////////////////
Lexer::Lexer (const std::string& text)
: _text (text)
, _cursor (0)
, _eos (text.size ())
{
}

View file

@ -43,7 +43,7 @@ public:
op,
word };
Lexer (const std::string&);
explicit Lexer (const std::string&);
bool token (std::string&, Lexer::Type&);
static std::string typeToString (Lexer::Type);
@ -78,9 +78,9 @@ public:
bool isWord (std::string&, Lexer::Type&);
private:
std::string _text;
std::size_t _cursor;
std::size_t _eos;
std::string _text {};
std::size_t _cursor {0};
std::size_t _eos {0};
};
#endif