summaryrefslogtreecommitdiff
path: root/Source/cmOutputConverter.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2016-10-04 22:56:30 +0200
committerStephen Kelly <steveire@gmail.com>2016-10-06 20:02:04 +0200
commitb61c268bd04425597e2e9c5f213dea3cdad3cb19 (patch)
treeafae82317b8785993a8a2cdfb4bc2986e7eb0d77 /Source/cmOutputConverter.cxx
parente278f5a84806a2b228182dc4a2cc98a1eaa19f8c (diff)
downloadcmake-b61c268bd04425597e2e9c5f213dea3cdad3cb19.tar.gz
Convert: Extract local variables for readability
Diffstat (limited to 'Source/cmOutputConverter.cxx')
-rw-r--r--Source/cmOutputConverter.cxx25
1 files changed, 13 insertions, 12 deletions
diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx
index eee1988814..70bcb99287 100644
--- a/Source/cmOutputConverter.cxx
+++ b/Source/cmOutputConverter.cxx
@@ -91,21 +91,22 @@ std::string cmOutputConverter::ConvertToRelativePath(
return remote_path;
}
+ const std::string relativePathTopBinary =
+ this->StateSnapshot.GetDirectory().GetRelativePathTopBinary();
+ const std::string relativePathTopSource =
+ this->StateSnapshot.GetDirectory().GetRelativePathTopSource();
+
const bool bothInBinary =
- cmOutputConverterNotAbove(
- local_path.c_str(),
- this->StateSnapshot.GetDirectory().GetRelativePathTopBinary()) &&
- cmOutputConverterNotAbove(
- remote_path.c_str(),
- this->StateSnapshot.GetDirectory().GetRelativePathTopBinary());
+ cmOutputConverterNotAbove(local_path.c_str(),
+ relativePathTopBinary.c_str()) &&
+ cmOutputConverterNotAbove(remote_path.c_str(),
+ relativePathTopBinary.c_str());
const bool bothInSource =
- cmOutputConverterNotAbove(
- local_path.c_str(),
- this->StateSnapshot.GetDirectory().GetRelativePathTopSource()) &&
- cmOutputConverterNotAbove(
- remote_path.c_str(),
- this->StateSnapshot.GetDirectory().GetRelativePathTopSource());
+ cmOutputConverterNotAbove(local_path.c_str(),
+ relativePathTopSource.c_str()) &&
+ cmOutputConverterNotAbove(remote_path.c_str(),
+ relativePathTopSource.c_str());
if (!(bothInSource || bothInBinary)) {
return remote_path;