diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-10-03 21:29:20 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-10-03 21:29:40 +0200 |
commit | 3b5fa8d50cd7e4db0691884effcbdc7809ad9ed9 (patch) | |
tree | 1aef7d220f01871ae2b5e0d49a585f966d321ccf /src/libexpr/names.hh | |
parent | 104e55bb7f593b1ac3c54ffda48a9d72af7fbe6b (diff) |
Don't recompile the same regex over and over
Diffstat (limited to 'src/libexpr/names.hh')
-rw-r--r-- | src/libexpr/names.hh | 6 |
1 files changed, 6 insertions, 0 deletions
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 <memory> + #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> regex; }; typedef list<DrvName> DrvNames; |