summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-10-16 14:35:47 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-10-16 14:35:47 -0500
commitc26bb4930c415bb8a9fc9bb8cfe835ebd180cb2e (patch)
tree54f0d7aa86ca818fee81f3e7f878363db5584818
parent111396c11d841ae7fd63c85b85c4219e151eaeff (diff)
downloadhorizon-c26bb4930c415bb8a9fc9bb8cfe835ebd180cb2e.tar.gz
horizon-c26bb4930c415bb8a9fc9bb8cfe835ebd180cb2e.tar.bz2
horizon-c26bb4930c415bb8a9fc9bb8cfe835ebd180cb2e.tar.xz
horizon-c26bb4930c415bb8a9fc9bb8cfe835ebd180cb2e.zip
hscript: Make valid_pkg a static var
-rw-r--r--hscript/meta.cc4
1 files changed, 3 insertions, 1 deletions
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<std::string> all_pkgs;