From f93285df551fc1c97eb969b37308d673408d86e3 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Mon, 14 Oct 2019 13:08:16 -0500 Subject: hscript: Move PkgInstall virt methods to .cc to avoid vtable emission --- hscript/meta.cc | 13 +++++++++++++ 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 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 { -- cgit v1.2.3-60-g2f50