mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-24 03:02:46 +08:00
Convert: Extract local variables for readability
This commit is contained in:
@@ -91,21 +91,22 @@ std::string cmOutputConverter::ConvertToRelativePath(
|
|||||||
return remote_path;
|
return remote_path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const std::string relativePathTopBinary =
|
||||||
|
this->StateSnapshot.GetDirectory().GetRelativePathTopBinary();
|
||||||
|
const std::string relativePathTopSource =
|
||||||
|
this->StateSnapshot.GetDirectory().GetRelativePathTopSource();
|
||||||
|
|
||||||
const bool bothInBinary =
|
const bool bothInBinary =
|
||||||
cmOutputConverterNotAbove(
|
cmOutputConverterNotAbove(local_path.c_str(),
|
||||||
local_path.c_str(),
|
relativePathTopBinary.c_str()) &&
|
||||||
this->StateSnapshot.GetDirectory().GetRelativePathTopBinary()) &&
|
cmOutputConverterNotAbove(remote_path.c_str(),
|
||||||
cmOutputConverterNotAbove(
|
relativePathTopBinary.c_str());
|
||||||
remote_path.c_str(),
|
|
||||||
this->StateSnapshot.GetDirectory().GetRelativePathTopBinary());
|
|
||||||
|
|
||||||
const bool bothInSource =
|
const bool bothInSource =
|
||||||
cmOutputConverterNotAbove(
|
cmOutputConverterNotAbove(local_path.c_str(),
|
||||||
local_path.c_str(),
|
relativePathTopSource.c_str()) &&
|
||||||
this->StateSnapshot.GetDirectory().GetRelativePathTopSource()) &&
|
cmOutputConverterNotAbove(remote_path.c_str(),
|
||||||
cmOutputConverterNotAbove(
|
relativePathTopSource.c_str());
|
||||||
remote_path.c_str(),
|
|
||||||
this->StateSnapshot.GetDirectory().GetRelativePathTopSource());
|
|
||||||
|
|
||||||
if (!(bothInSource || bothInBinary)) {
|
if (!(bothInSource || bothInBinary)) {
|
||||||
return remote_path;
|
return remote_path;
|
||||||
|
Reference in New Issue
Block a user