From 3b5fa8d50cd7e4db0691884effcbdc7809ad9ed9 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 3 Oct 2014 21:29:20 +0200 Subject: Don't recompile the same regex over and over --- src/libexpr/names.hh | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/libexpr/names.hh') diff --git a/src/libexpr/names.hh b/src/libexpr/names.hh index ebe113e82..4b3dcddf7 100644 --- a/src/libexpr/names.hh +++ b/src/libexpr/names.hh @@ -1,6 +1,9 @@ #pragma once +#include + #include "types.hh" +#include "regex.hh" namespace nix { @@ -14,6 +17,9 @@ struct DrvName DrvName(); DrvName(const string & s); bool matches(DrvName & n); + +private: + std::shared_ptr regex; }; typedef list DrvNames; -- cgit v1.2.3