浏览代码

Ninja: Replace ternary with if()

On principle of segregating the interface.
Stephen Kelly 9 年之前
父节点
当前提交
e80314d7a8
共有 1 个文件被更改,包括 4 次插入3 次删除
  1. 4 3
      Source/cmLocalNinjaGenerator.cxx

+ 4 - 3
Source/cmLocalNinjaGenerator.cxx

@@ -132,9 +132,10 @@ std::string cmLocalNinjaGenerator::ConvertToIncludeReference(
   std::string const& path, cmOutputConverter::OutputFormat format,
   std::string const& path, cmOutputConverter::OutputFormat format,
   bool forceFullPaths)
   bool forceFullPaths)
 {
 {
-  return this->Convert(path, forceFullPaths ? cmOutputConverter::FULL
-                                            : cmOutputConverter::HOME_OUTPUT,
-                       format);
+  if (forceFullPaths) {
+    return this->Convert(path, cmOutputConverter::FULL, format);
+  }
+  return this->Convert(path, cmOutputConverter::HOME_OUTPUT, format);
 }
 }
 
 
 // Private methods.
 // Private methods.