Explorar el Código

Convert: Simplify switch

Make it more clear what is happening here.
Stephen Kelly hace 9 años
padre
commit
76833149ec
Se han modificado 1 ficheros con 4 adiciones y 5 borrados
  1. 4 5
      Source/cmOutputConverter.cxx

+ 4 - 5
Source/cmOutputConverter.cxx

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