diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2014-02-22 00:05:55 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-03-08 18:05:37 (GMT) |
commit | b3bf31a5488a19ea3c357e346b882a2ca84c63b6 (patch) | |
tree | 42cb81b5ec3c7888ef4f75e68f767f3992c4ec4f /Source/cmXCodeObject.h | |
parent | 5af95c396dc780c04444f549b957c2cba7c75309 (diff) | |
download | CMake-b3bf31a5488a19ea3c357e346b882a2ca84c63b6.zip CMake-b3bf31a5488a19ea3c357e346b882a2ca84c63b6.tar.gz CMake-b3bf31a5488a19ea3c357e346b882a2ca84c63b6.tar.bz2 |
stringapi: Miscellaneous char* parameters
Diffstat (limited to 'Source/cmXCodeObject.h')
-rw-r--r-- | Source/cmXCodeObject.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Source/cmXCodeObject.h b/Source/cmXCodeObject.h index 3a6528a..ed2940a 100644 --- a/Source/cmXCodeObject.h +++ b/Source/cmXCodeObject.h @@ -38,12 +38,12 @@ public: PBXType GetIsA() { return this->IsA;} void SetString(const std::string& s); - const char* GetString() + const std::string& GetString() { - return this->String.c_str(); + return this->String; } - void AddAttribute(const char* name, cmXCodeObject* value) + void AddAttribute(const std::string& name, cmXCodeObject* value) { this->ObjectAttributes[name] = value; } @@ -79,11 +79,11 @@ public: static void PrintList(std::vector<cmXCodeObject*> const&, std::ostream& out); - const char* GetId() + const std::string& GetId() { - return this->Id.c_str(); + return this->Id; } - void SetId(const char* id) + void SetId(const std::string& id) { this->Id = id; } @@ -95,8 +95,8 @@ public: { this->Target = t; } - const char* GetComment() {return this->Comment.c_str();} - bool HasComment() { return (this->Comment.size() != 0);} + const std::string& GetComment() {return this->Comment;} + bool HasComment() { return (!this->Comment.empty());} cmXCodeObject* GetObject(const char* name) { if(this->ObjectAttributes.count(name)) @@ -141,7 +141,7 @@ public: return this->DependTargets; } std::vector<cmXCodeObject*> const& GetObjectList() { return this->List;} - void SetComment(const char* c) { this->Comment = c;} + void SetComment(const std::string& c) { this->Comment = c;} static void PrintString(std::ostream& os,std::string String); protected: void PrintString(std::ostream& os) const; |