cmOutputConverter::Convert: invert condition
Make the control flow of the 'optional' argument more explicit.
This commit is contained in:
parent
c23f89bc76
commit
cde127b084
@ -168,14 +168,14 @@ std::string cmOutputConverter::Convert(RelativeRoot remote,
|
|||||||
const char* remotePath = this->GetRelativeRootPath(remote);
|
const char* remotePath = this->GetRelativeRootPath(remote);
|
||||||
assert(remotePath != 0);
|
assert(remotePath != 0);
|
||||||
|
|
||||||
if (!local.empty() && !optional) {
|
if (local.empty() || optional) {
|
||||||
std::vector<std::string> components;
|
return this->ConvertToOutputFormat(remotePath, output);
|
||||||
cmSystemTools::SplitPath(local, components);
|
|
||||||
std::string result = this->ConvertToRelativePath(components, remotePath);
|
|
||||||
return this->ConvertToOutputFormat(result, output);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return this->ConvertToOutputFormat(remotePath, output);
|
std::vector<std::string> components;
|
||||||
|
cmSystemTools::SplitPath(local, components);
|
||||||
|
std::string result = this->ConvertToRelativePath(components, remotePath);
|
||||||
|
return this->ConvertToOutputFormat(result, output);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool cmOutputConverterNotAbove(const char* a, const char* b)
|
static bool cmOutputConverterNotAbove(const char* a, const char* b)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user