From 67581187aefbb2a38338adf3218f57cbf41f3b16 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sat, 25 Oct 2014 22:20:32 -0400 Subject: [PATCH] CLI - Converted CmdCalc from Parser to CLI. --- src/Context.cpp | 2 +- src/commands/CmdCalc.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Context.cpp b/src/Context.cpp index 67c90c39c..586c0bb4a 100644 --- a/src/Context.cpp +++ b/src/Context.cpp @@ -454,9 +454,9 @@ int Context::dispatch (std::string &out) if (c->displays_id () && !tdb2.read_only ()) tdb2.gc (); +/* // Only read-only commands can be run when TDB2 is read-only. // TODO Implement TDB2::read_only -/* if (tdb2.read_only () && !c->read_only ()) throw std::string (""); */ diff --git a/src/commands/CmdCalc.cpp b/src/commands/CmdCalc.cpp index 59b4db268..714ead4d6 100644 --- a/src/commands/CmdCalc.cpp +++ b/src/commands/CmdCalc.cpp @@ -63,7 +63,7 @@ int CmdCalc::execute (std::string& output) // Compile all the args into one expression. std::string expression; - std::vector words = context.parser.getWords (); + std::vector words = context.cli.getWords (); std::vector ::iterator word; for (word = words.begin (); word != words.end (); ++word) expression += *word + " ";