summaryrefslogtreecommitdiffstats
path: root/Source/CPack
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2014-04-30 17:12:29 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2014-06-09 18:45:35 (GMT)
commit3e7194a215aed5e34acf32ad4b8c6bd948beb15e (patch)
treed64f0613579fdf8fda51ce8fd05f6045a3a2142e /Source/CPack
parent9e8fa1043ce9bfcffdcfa395f618dd7958ef4251 (diff)
downloadCMake-3e7194a215aed5e34acf32ad4b8c6bd948beb15e.zip
CMake-3e7194a215aed5e34acf32ad4b8c6bd948beb15e.tar.gz
CMake-3e7194a215aed5e34acf32ad4b8c6bd948beb15e.tar.bz2
regex: Use static regexs where possible
Rather than declaring and compiling a constant regex every time a chunk of code is executed, build the regex once.
Diffstat (limited to 'Source/CPack')
-rw-r--r--Source/CPack/cmCPackNSISGenerator.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx
index 0113698..a5eee6b 100644
--- a/Source/CPack/cmCPackNSISGenerator.cxx
+++ b/Source/CPack/cmCPackNSISGenerator.cxx
@@ -588,8 +588,8 @@ void cmCPackNSISGenerator::CreateMenuLinks( cmOStringStream& str,
return;
}
- cmsys::RegularExpression urlRegex;
- urlRegex.compile("^(mailto:|(ftps?|https?|news)://).*$");
+ static cmsys::RegularExpression
+ urlRegex("^(mailto:|(ftps?|https?|news)://).*$");
std::vector<std::string>::iterator it;
for ( it = cpackMenuLinksVector.begin();