From be1cc09981d24c94a07f08c615e66e3a261294af Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Tue, 8 Oct 2019 20:12:38 -0500 Subject: hscript: Simplify MISSING_ERROR usage --- hscript/script.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'hscript/script.cc') diff --git a/hscript/script.cc b/hscript/script.cc index c282f41..5ff7cb2 100644 --- a/hscript/script.cc +++ b/hscript/script.cc @@ -239,24 +239,24 @@ const Script *Script::load(std::istream &sstream, const ScriptOptions opts) { /* Ensure all required keys are present. */ #define MISSING_ERROR(key) \ output_error("installfile:" + std::to_string(lineno),\ - "expected value for key '" + key + "'",\ + "expected value for key '" + std::string(key) + "'",\ "this key is required", (opts.test(Pretty)));\ errors++; if(!the_script->internal->network) { - MISSING_ERROR(std::string("network")) + MISSING_ERROR("network") } if(!the_script->internal->hostname) { - MISSING_ERROR(std::string("hostname")) + MISSING_ERROR("hostname") } if(the_script->internal->packages.size() == 0) { - MISSING_ERROR(std::string("pkginstall")) + MISSING_ERROR("pkginstall") } if(!the_script->internal->rootpw) { - MISSING_ERROR(std::string("rootpw")) + MISSING_ERROR("rootpw") } if(the_script->internal->mounts.size() == 0) { - MISSING_ERROR(std::string("mount")) + MISSING_ERROR("mount") } #undef MISSING_ERROR -- cgit v1.2.3-70-g09d2