summaryrefslogtreecommitdiffstats
path: root/Source/cmStringCommand.cxx
diff options
context:
space:
mode:
authorvvs31415 <vvs31415@users.noreply.github.com>2021-03-13 12:00:00 (GMT)
committerVitaly Stakhovsky <vvs31415@gitlab.org>2021-03-13 12:36:07 (GMT)
commit12624ebd7ee1380b5e5aa0bc3bcbb03c4d9aec73 (patch)
tree58a7df28ea4ebc050db603ebd3bca79ca5aeb77c /Source/cmStringCommand.cxx
parent982f7bb5063453d3c0be102c917bb660ec21978b (diff)
downloadCMake-12624ebd7ee1380b5e5aa0bc3bcbb03c4d9aec73.zip
CMake-12624ebd7ee1380b5e5aa0bc3bcbb03c4d9aec73.tar.gz
CMake-12624ebd7ee1380b5e5aa0bc3bcbb03c4d9aec73.tar.bz2
Source: Reduce c_str() usage
Diffstat (limited to 'Source/cmStringCommand.cxx')
-rw-r--r--Source/cmStringCommand.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmStringCommand.cxx b/Source/cmStringCommand.cxx
index 23fc3e0..5fa309d 100644
--- a/Source/cmStringCommand.cxx
+++ b/Source/cmStringCommand.cxx
@@ -241,7 +241,7 @@ bool RegexMatch(std::vector<std::string> const& args,
status.GetMakefile().ClearMatches();
// Compile the regular expression.
cmsys::RegularExpression re;
- if (!re.compile(regex.c_str())) {
+ if (!re.compile(regex)) {
std::string e =
"sub-command REGEX, mode MATCH failed to compile regex \"" + regex +
"\".";
@@ -283,7 +283,7 @@ bool RegexMatchAll(std::vector<std::string> const& args,
status.GetMakefile().ClearMatches();
// Compile the regular expression.
cmsys::RegularExpression re;
- if (!re.compile(regex.c_str())) {
+ if (!re.compile(regex)) {
std::string e =
"sub-command REGEX, mode MATCHALL failed to compile regex \"" + regex +
"\".";