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.cc17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/operator-check.cc b/src/operator-check.cc
index 045f8b0..110ce9c 100644
--- a/src/operator-check.cc
+++ b/src/operator-check.cc
@@ -1,9 +1,10 @@
-/** --------------------------------------------------------------------
+/**
* @file operator-check.cc
* @author Implementation of the CHECK command.
* @author Andreas Aardal Hanssen
* @date 2002-2005
- * ----------------------------------------------------------------- **/
+ */
+
#include "depot.h"
#include "mailbox.h"
#include "operators.h"
@@ -13,40 +14,34 @@
#include <string>
-using namespace ::std;
using namespace Binc;
-//----------------------------------------------------------------------
CheckOperator::CheckOperator(void) {}
-//----------------------------------------------------------------------
CheckOperator::~CheckOperator(void) {}
-//----------------------------------------------------------------------
-const string CheckOperator::getName(void) const
+const std::string CheckOperator::getName(void) const
{
return "CHECK";
}
-//----------------------------------------------------------------------
int CheckOperator::getState(void) const
{
return Session::SELECTED;
}
-//------------------------------------------------------------------------
Operator::ProcessResult CheckOperator::process(Depot &depot, Request &command)
{
Mailbox *mailbox = depot.getSelected();
- if (mailbox != 0)
+ if (mailbox != nullptr) {
pendingUpdates(mailbox,
PendingUpdates::FLAGS | PendingUpdates::EXISTS | PendingUpdates::RECENT,
true);
+ }
return OK;
}
-//----------------------------------------------------------------------
Operator::ParseResult CheckOperator::parse(Request &c_in) const
{
Session &session = Session::getInstance();