Move loop inside of condition.
The loop is only executed if the condition is true.
This commit is contained in:
parent
0b61b86df8
commit
abfca97525
@ -2295,6 +2295,8 @@ cmLocalUnixMakefileGenerator3::ConvertToQuotedOutputPath(const char* p,
|
|||||||
// Begin the quoted result with the root component.
|
// Begin the quoted result with the root component.
|
||||||
result += components[0];
|
result += components[0];
|
||||||
|
|
||||||
|
if (components.size() > 1)
|
||||||
|
{
|
||||||
// Now add the rest of the components separated by the proper slash
|
// Now add the rest of the components separated by the proper slash
|
||||||
// direction for this platform.
|
// direction for this platform.
|
||||||
bool first = true;
|
bool first = true;
|
||||||
@ -2310,8 +2312,6 @@ cmLocalUnixMakefileGenerator3::ConvertToQuotedOutputPath(const char* p,
|
|||||||
first = false;
|
first = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (components.size() > 1)
|
|
||||||
{
|
|
||||||
// Only the last component can be empty to avoid double slashes.
|
// Only the last component can be empty to avoid double slashes.
|
||||||
if(!first)
|
if(!first)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user