Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
CMake
CMake
Commits
be87cb0c
Commit
be87cb0c
authored
Oct 09, 2016
by
Stephen Kelly
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmLocalGenerator: Simplify loop with range algorithm
parent
425cd167
Pipeline
#31167
passed with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
Source/cmLocalGenerator.cxx
Source/cmLocalGenerator.cxx
+4
-6
No files found.
Source/cmLocalGenerator.cxx
View file @
be87cb0c
...
...
@@ -505,8 +505,7 @@ static const char* ruleReplaceVars[] = {
"CMAKE_CURRENT_BINARY_DIR"
,
"CMAKE_RANLIB"
,
"CMAKE_LINKER"
,
"CMAKE_CL_SHOWINCLUDES_PREFIX"
,
CM_NULLPTR
"CMAKE_CL_SHOWINCLUDES_PREFIX"
};
std
::
string
cmLocalGenerator
::
ExpandRuleVariable
(
...
...
@@ -693,12 +692,12 @@ std::string cmLocalGenerator::ExpandRuleVariable(
std
::
vector
<
std
::
string
>
enabledLanguages
=
this
->
GetState
()
->
GetEnabledLanguages
();
// loop over language specific replace variables
int
pos
=
0
;
while
(
ruleReplaceVars
[
pos
]
)
{
for
(
const
char
*
const
*
replaceIter
=
cmArrayBegin
(
ruleReplaceVars
)
;
replaceIter
!=
cmArrayEnd
(
ruleReplaceVars
);
++
replaceIter
)
{
for
(
std
::
vector
<
std
::
string
>::
iterator
i
=
enabledLanguages
.
begin
();
i
!=
enabledLanguages
.
end
();
++
i
)
{
const
char
*
lang
=
i
->
c_str
();
std
::
string
actualReplace
=
r
uleR
eplace
Vars
[
pos
]
;
std
::
string
actualReplace
=
*
replace
Iter
;
// If this is the compiler then look for the extra variable
// _COMPILER_ARG1 which must be the first argument to the compiler
const
char
*
compilerArg1
=
CM_NULLPTR
;
...
...
@@ -759,7 +758,6 @@ std::string cmLocalGenerator::ExpandRuleVariable(
return
replace
;
}
}
pos
++
;
}
return
variable
;
}
...
...
Brad King
@brad.king
Mentioned in commit
9a2048f1
·
Oct 17, 2016
Mentioned in commit
9a2048f1
Mentioned in commit 9a2048f1ea6687530e209992c3f5eafcbc02b2a9
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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