Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
CMake
CMake
Commits
0123cb0f
Commit
0123cb0f
authored
Dec 02, 2002
by
Ken Martin
Browse files
fix compile warning
parent
952c2f2d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Source/cmStringCommand.cxx
View file @
0123cb0f
...
...
@@ -250,14 +250,14 @@ bool cmStringCommand::RegexReplace(std::vector<std::string> const& args)
std
::
string
::
size_type
base
=
0
;
while
(
re
.
find
(
input
.
c_str
()
+
base
))
{
std
::
string
::
size_type
l
=
re
.
start
();
std
::
string
::
size_type
l
2
=
re
.
start
();
std
::
string
::
size_type
r
=
re
.
end
();
// Concatenate the part of the input that was not matched.
output
+=
input
.
substr
(
base
,
l
);
output
+=
input
.
substr
(
base
,
l
2
);
// Make sure the match had some text.
if
(
r
-
l
==
0
)
if
(
r
-
l
2
==
0
)
{
std
::
string
e
=
"sub-command REGEX, mode REPLACE regex
\"
"
+
regex
+
"
\"
matched an empty string."
;
this
->
SetError
(
e
.
c_str
());
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment