From c26bb4930c415bb8a9fc9bb8cfe835ebd180cb2e Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Wed, 16 Oct 2019 14:35:47 -0500 Subject: hscript: Make valid_pkg a static var --- hscript/meta.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hscript/meta.cc b/hscript/meta.cc index 3b18865..299c1f0 100644 --- a/hscript/meta.cc +++ b/hscript/meta.cc @@ -137,9 +137,11 @@ bool Hostname::execute(ScriptOptions opts) const { } +static std::regex valid_pkg("[0-9A-Za-z+_.-]*((>?<|[<>]?=|[~>])[0-9A-Za-z-_.]+)?"); + + Key *PkgInstall::parseFromData(const std::string &data, int lineno, int *errors, int *warnings) { - std::regex valid_pkg("[0-9A-Za-z+_.-]*((>?<|[<>]?=|[~>])[0-9A-Za-z-_.]+)?"); std::string next_pkg; std::istringstream stream(data); std::set all_pkgs; -- cgit v1.2.3-70-g09d2