Browse Source

Xcode: PrintComment will prepend a whitespace itself before the comment

Gregor Jasny 10 years ago
parent
commit
6e8952c193
2 changed files with 3 additions and 4 deletions
  1. 1 1
      Source/cmXCode21Object.cxx
  2. 2 3
      Source/cmXCodeObject.cxx

+ 1 - 1
Source/cmXCode21Object.cxx

@@ -31,7 +31,7 @@ void cmXCode21Object::PrintComment(std::ostream& out)
       cmSystemTools::ReplaceString(this->Comment, "\"", "");
       }
     }
-  out << "/* ";
+  out << " /* ";
   out << this->Comment;
   out << " */";
 }

+ 2 - 3
Source/cmXCodeObject.cxx

@@ -98,7 +98,7 @@ void cmXCodeObject::Print(std::ostream& out)
     separator = " ";
     indentFactor = 0;
     }
-  out << this->Id << " ";
+  out << this->Id;
   if(!(this->IsA == PBXGroup && this->Comment.size() == 0))
     {
     this->PrintComment(out);
@@ -129,7 +129,7 @@ void cmXCodeObject::Print(std::ostream& out)
       for(unsigned int k = 0; k < i->second->List.size(); k++)
         {
         cmXCodeObject::Indent(4*indentFactor, out);
-        out << i->second->List[k]->Id << " ";
+        out << i->second->List[k]->Id;
         i->second->List[k]->PrintComment(out);
         out << "," << separator;
         }
@@ -192,7 +192,6 @@ void cmXCodeObject::Print(std::ostream& out)
       out << " = " << object->Object->Id;
       if(object->Object->HasComment() && i->first != "remoteGlobalIDString")
         {
-        out << " ";
         object->Object->PrintComment(out);
         }
       out << ";" << separator;