浏览代码

cmMakefile: Replace ternary with bool => int cast

Alex Turbov 1 年之前
父节点
当前提交
b9a5a2b494
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      Source/cmMakefile.cxx

+ 2 - 2
Source/cmMakefile.cxx

@@ -370,9 +370,9 @@ void cmMakefile::PrintCommandTrace(cmListFileFunction const& lff,
         val["args"].append(arg);
       }
       val["time"] = cmSystemTools::GetTime();
-      val["frame"] = (missing == CommandMissingFromStack::Yes ? 1 : 0) +
+      val["frame"] = int(missing == CommandMissingFromStack::Yes) +
         static_cast<Json::Value::UInt64>(this->ExecutionStatusStack.size());
-      val["global_frame"] = (missing == CommandMissingFromStack::Yes ? 1 : 0) +
+      val["global_frame"] = int(missing == CommandMissingFromStack::Yes) +
         static_cast<Json::Value::UInt64>(this->RecursionDepth);
       msg << Json::writeString(builder, val);
 #endif