From e278f5a84806a2b228182dc4a2cc98a1eaa19f8c Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Tue, 4 Oct 2016 22:56:30 +0200 Subject: Convert: Extract local variables Remove comment made obsolete by them. --- Source/cmOutputConverter.cxx | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx index 0b270aa..eee1988 100644 --- a/Source/cmOutputConverter.cxx +++ b/Source/cmOutputConverter.cxx @@ -91,20 +91,23 @@ std::string cmOutputConverter::ConvertToRelativePath( return remote_path; } - // Skip conversion if the path and local are not both in the source - // or both in the binary tree. - if (!((cmOutputConverterNotAbove( - local_path.c_str(), - this->StateSnapshot.GetDirectory().GetRelativePathTopBinary()) && - cmOutputConverterNotAbove( - remote_path.c_str(), - this->StateSnapshot.GetDirectory().GetRelativePathTopBinary())) || - (cmOutputConverterNotAbove( - local_path.c_str(), - this->StateSnapshot.GetDirectory().GetRelativePathTopSource()) && - cmOutputConverterNotAbove( - remote_path.c_str(), - 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()); + + const bool bothInSource = + cmOutputConverterNotAbove( + local_path.c_str(), + this->StateSnapshot.GetDirectory().GetRelativePathTopSource()) && + cmOutputConverterNotAbove( + remote_path.c_str(), + this->StateSnapshot.GetDirectory().GetRelativePathTopSource()); + + if (!(bothInSource || bothInBinary)) { return remote_path; } -- cgit v0.12