浏览代码

Xcode: Let PrintComment decide if the comment is non-empty

Gregor Jasny 10 年之前
父节点
当前提交
a6331eb851
共有 2 个文件被更改,包括 5 次插入4 次删除
  1. 4 0
      Source/cmXCode21Object.cxx
  2. 1 4
      Source/cmXCodeObject.cxx

+ 4 - 0
Source/cmXCode21Object.cxx

@@ -31,6 +31,10 @@ void cmXCode21Object::PrintComment(std::ostream& out)
       cmSystemTools::ReplaceString(this->Comment, "\"", "");
       }
     }
+  if(this->Comment.empty())
+    {
+    return;
+    }
   out << " /* ";
   out << this->Comment;
   out << " */";

+ 1 - 4
Source/cmXCodeObject.cxx

@@ -99,10 +99,7 @@ void cmXCodeObject::Print(std::ostream& out)
     indentFactor = 0;
     }
   out << this->Id;
-  if(!(this->IsA == PBXGroup && this->Comment.size() == 0))
-    {
-    this->PrintComment(out);
-    }
+  this->PrintComment(out);
   out << " = {";
   if(separator == "\n")
     {