Commit 3f1afa7c authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

[master] define virtual dtor for master lexer state classes.

just for silencing some compilers.  in our usage this doesn't matter
in practice.  committing at my discretion.
parent 9a11ef62
......@@ -170,6 +170,7 @@ namespace {
class CRLF : public State {
public:
CRLF() {}
virtual ~CRLF() {} // see the base class for the destructor
virtual const State* handle(MasterLexer& lexer) const {
// We've just seen '\r'. If this is part of a sequence of '\r\n',
// we combine them as a single END-OF-LINE. Otherwise we treat the
......@@ -195,6 +196,7 @@ public:
class String : public State {
public:
String() {}
virtual ~String() {} // see the base class for the destructor
virtual const State* handle(MasterLexer& /*lexer*/) const {
return (NULL);
}
......
......@@ -55,6 +55,12 @@ namespace master_lexer_internal {
/// this library are expected to use this class.
class State {
public:
/// \brief Virtual destructor.
///
/// In our usage this actually doesn't matter, but some compilers complain
/// about it and we need to silence them.
virtual ~State() {}
/// \brief Begin state transitions to get the next token.
///
/// This is the first method that \c MasterLexer needs to call for a
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment