DOM: Demoted from class to functions

- The DOM object contains no members, and only two (effectively) const methods.
  Demoting DOM to function calls reduces coupling with Context.
This commit is contained in:
Paul Beckingham
2016-02-03 21:54:37 -05:00
parent ec4e6af00d
commit 820cc4b2e5
7 changed files with 14 additions and 21 deletions

View File

@@ -37,6 +37,8 @@
#include <sys/wait.h>
#include <sys/types.h>
#include <Context.h>
#include <Variant.h>
#include <DOM.h>
#include <JSON.h>
#include <Timer.h>
#include <text.h>
@@ -501,7 +503,7 @@ std::vector <std::string>& Hooks::buildHookScriptArgs (std::vector <std::string>
args.push_back ("api:2");
// Command line Taskwarrior was called with.
context.dom.get ("context.args", v);
getDOM ("context.args", v);
args.push_back ("args:" + std::string (v));
// Command to be executed.