summaryrefslogtreecommitdiff
path: root/Source/cmBuildNameCommand.cxx
diff options
context:
space:
mode:
authorVitaly Stakhovsky <vvs31415@gitlab.org>2018-08-07 11:27:20 -0400
committerBrad King <brad.king@kitware.com>2018-08-07 15:28:24 -0400
commit69ca85cc7faf937d6d9d1dc1a27e062cd7765b1f (patch)
treef323fcadf3c4e11227a0eea006ae7bfa17e8d26c /Source/cmBuildNameCommand.cxx
parentd7a52f8c24a29ff7f64b00566b646f2d125d4ac0 (diff)
downloadcmake-69ca85cc7faf937d6d9d1dc1a27e062cd7765b1f.tar.gz
Remove unnecessary c_str() in RegularExpression::find calls
Diffstat (limited to 'Source/cmBuildNameCommand.cxx')
-rw-r--r--Source/cmBuildNameCommand.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmBuildNameCommand.cxx b/Source/cmBuildNameCommand.cxx
index 5f54338c28..ddff686865 100644
--- a/Source/cmBuildNameCommand.cxx
+++ b/Source/cmBuildNameCommand.cxx
@@ -40,8 +40,8 @@ bool cmBuildNameCommand::InitialPass(std::vector<std::string> const& args,
cmSystemTools::RunSingleCommand("uname -a", &buildname, &buildname);
if (!buildname.empty()) {
std::string RegExp = "([^ ]*) [^ ]* ([^ ]*) ";
- cmsys::RegularExpression reg(RegExp.c_str());
- if (reg.find(buildname.c_str())) {
+ cmsys::RegularExpression reg(RegExp);
+ if (reg.find(buildname)) {
buildname = reg.match(1) + "-" + reg.match(2);
}
}