- Converted CmdCalc from Parser to CLI.
This commit is contained in:
Paul Beckingham 2014-10-25 22:20:32 -04:00
parent 11d9fcb49c
commit 67581187ae
2 changed files with 2 additions and 2 deletions

View file

@ -454,9 +454,9 @@ int Context::dispatch (std::string &out)
if (c->displays_id () && !tdb2.read_only ()) if (c->displays_id () && !tdb2.read_only ())
tdb2.gc (); tdb2.gc ();
/*
// Only read-only commands can be run when TDB2 is read-only. // Only read-only commands can be run when TDB2 is read-only.
// TODO Implement TDB2::read_only // TODO Implement TDB2::read_only
/*
if (tdb2.read_only () && !c->read_only ()) if (tdb2.read_only () && !c->read_only ())
throw std::string (""); throw std::string ("");
*/ */

View file

@ -63,7 +63,7 @@ int CmdCalc::execute (std::string& output)
// Compile all the args into one expression. // Compile all the args into one expression.
std::string expression; std::string expression;
std::vector <std::string> words = context.parser.getWords (); std::vector <std::string> words = context.cli.getWords ();
std::vector <std::string>::iterator word; std::vector <std::string>::iterator word;
for (word = words.begin (); word != words.end (); ++word) for (word = words.begin (); word != words.end (); ++word)
expression += *word + " "; expression += *word + " ";