diff options
Diffstat (limited to 'Source/cmXCodeObject.h')
-rw-r--r-- | Source/cmXCodeObject.h | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/Source/cmXCodeObject.h b/Source/cmXCodeObject.h index b92e6e3..51e5d36 100644 --- a/Source/cmXCodeObject.h +++ b/Source/cmXCodeObject.h @@ -94,8 +94,8 @@ public: } static void Indent(int level, std::ostream& out); void Print(std::ostream& out); - void PrintAttribute(std::ostream& out, const int level, - const std::string separator, const int factor, + void PrintAttribute(std::ostream& out, int level, + const std::string& separator, int factor, const std::string& name, const cmXCodeObject* object, const cmXCodeObject* parent); virtual void PrintComment(std::ostream&) {} @@ -114,19 +114,17 @@ public: if (i != this->ObjectAttributes.end()) { return i->second; } - return 0; + return nullptr; } // search the attribute list for an object of the specified type cmXCodeObject* GetObject(cmXCodeObject::PBXType t) const { - for (std::vector<cmXCodeObject*>::const_iterator i = this->List.begin(); - i != this->List.end(); ++i) { - cmXCodeObject* o = *i; + for (auto o : this->List) { if (o->IsA == t) { return o; } } - return 0; + return nullptr; } void CopyAttributes(cmXCodeObject*); @@ -152,7 +150,7 @@ public: return this->List; } void SetComment(const std::string& c) { this->Comment = c; } - static void PrintString(std::ostream& os, std::string String); + static void PrintString(std::ostream& os, const std::string& String); protected: void PrintString(std::ostream& os) const; |