summaryrefslogtreecommitdiff
path: root/src/operator-check.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/operator-check.cc')
-rw-r--r--src/operator-check.cc13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/operator-check.cc b/src/operator-check.cc
index 260487e..2514fcc 100644
--- a/src/operator-check.cc
+++ b/src/operator-check.cc
@@ -25,7 +25,7 @@ const std::string CheckOperator::getName() const
return "CHECK";
}
-int CheckOperator::getState() const
+Session::State CheckOperator::getState() const
{
return Session::SELECTED;
}
@@ -39,21 +39,20 @@ Operator::ProcessResult CheckOperator::process(Depot &depot, Request &command)
true);
}
- return OK;
+ return Operator::ProcessResult::OK;
}
-Operator::ParseResult CheckOperator::parse(Request &c_in) const
+Parser::ParseResult CheckOperator::parse(Request &c_in)
{
Session &session = Session::getInstance();
- if (c_in.getUidMode()) return REJECT;
+ if (c_in.getUidMode()) return Parser::ParseResult::REJECT;
- Operator::ParseResult res;
- if ((res = expectCRLF()) != ACCEPT) {
+ if (Parser::ParseResult res = expectCRLF(); res != Parser::ParseResult::ACCEPT) {
session.setLastError("Expected CRLF after CHECK");
return res;
}
c_in.setName("CHECK");
- return ACCEPT;
+ return Parser::ParseResult::ACCEPT;
}