diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-10-14 13:08:16 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-10-14 13:08:16 -0500 |
commit | f93285df551fc1c97eb969b37308d673408d86e3 (patch) | |
tree | 628d088cd991d8ba8c69038147ddcca8f92c3930 /hscript | |
parent | d90ac4c662c4c86f35d3f302e44831845917e028 (diff) | |
download | horizon-f93285df551fc1c97eb969b37308d673408d86e3.tar.gz horizon-f93285df551fc1c97eb969b37308d673408d86e3.tar.bz2 horizon-f93285df551fc1c97eb969b37308d673408d86e3.tar.xz horizon-f93285df551fc1c97eb969b37308d673408d86e3.zip |
hscript: Move PkgInstall virt methods to .cc to avoid vtable emission
Diffstat (limited to 'hscript')
-rw-r--r-- | hscript/meta.cc | 13 | ||||
-rw-r--r-- | hscript/meta.hh | 5 |
2 files changed, 15 insertions, 3 deletions
diff --git a/hscript/meta.cc b/hscript/meta.cc index e1f7b2f..3b18865 100644 --- a/hscript/meta.cc +++ b/hscript/meta.cc @@ -164,6 +164,19 @@ Key *PkgInstall::parseFromData(const std::string &data, int lineno, int *errors, return new PkgInstall(lineno, all_pkgs); } + +bool PkgInstall::validate(ScriptOptions) const { + /* Any validation errors would have occurred above. */ + return true; /* LCOV_EXCL_LINE */ +} + + +bool PkgInstall::execute(ScriptOptions) const { + /* Package installation is handled in Script::execute. */ + return true; /* LCOV_EXCL_LINE */ +} + + Key *Repository::parseFromData(const std::string &data, int lineno, int *errors, int *) { if(data.empty() || (data[0] != '/' && data.compare(0, 4, "http"))) { diff --git a/hscript/meta.hh b/hscript/meta.hh index b73cda4..035bb8a 100644 --- a/hscript/meta.hh +++ b/hscript/meta.hh @@ -40,9 +40,8 @@ public: static Key *parseFromData(const std::string &data, int lineno, int *errors, int *warnings); const std::set<std::string> packages() const { return _pkgs; } - bool validate(ScriptOptions) const override { return true; } - bool execute(ScriptOptions) const override { return true; } - + bool validate(ScriptOptions) const override; + bool execute(ScriptOptions) const override; }; class Language : public StringKey { |