فهرست منبع

Convert: Simplify switch

Make it more clear what is happening here.
Stephen Kelly 9 سال پیش
والد
کامیت
76833149ec
1فایلهای تغییر یافته به همراه4 افزوده شده و 5 حذف شده
  1. 4 5
      Source/cmOutputConverter.cxx

+ 4 - 5
Source/cmOutputConverter.cxx

@@ -53,15 +53,14 @@ std::string cmOutputConverter::ConvertToRelativePath(
 
 
   switch (relative) {
   switch (relative) {
     case HOME_OUTPUT:
     case HOME_OUTPUT:
-      result = this->ConvertToRelativePath(
-        this->GetState()->GetBinaryDirectory(), source);
+      result = this->GetState()->GetBinaryDirectory();
       break;
       break;
     case START_OUTPUT:
     case START_OUTPUT:
-      result = this->ConvertToRelativePath(
-        this->StateSnapshot.GetDirectory().GetCurrentBinary(), source);
+      result = this->StateSnapshot.GetDirectory().GetCurrentBinary();
       break;
       break;
   }
   }
-  return result;
+
+  return this->ConvertToRelativePath(result, source);
 }
 }
 
 
 std::string cmOutputConverter::Convert(const std::string& source,
 std::string cmOutputConverter::Convert(const std::string& source,