diff options
author | 2025-04-06 11:44:13 +0200 | |
---|---|---|
committer | 2025-04-06 11:44:13 +0200 | |
commit | 31f1a810e5264ef970bab17d517692ef906470e1 (patch) | |
tree | 672bd841e21fb43fe8e7f8c7ddf9333d687c5a6d | |
parent | 8e310421adfa157a0a62c903b0bcd83cf27c3f46 (diff) | |
download | libplist-31f1a810e5264ef970bab17d517692ef906470e1.tar.gz libplist-31f1a810e5264ef970bab17d517692ef906470e1.tar.bz2 |
C++: Add const char* constructor to String class
-rw-r--r-- | include/plist/String.h | 1 | ||||
-rw-r--r-- | src/String.cpp | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/include/plist/String.h b/include/plist/String.h index 4392482..7e8a6e4 100644 --- a/include/plist/String.h +++ b/include/plist/String.h @@ -37,6 +37,7 @@ public : String& operator=(const String& s); String& operator=(const char* s); String(const std::string& s); + String(const char *s); virtual ~String(); Node* Clone() const; diff --git a/src/String.cpp b/src/String.cpp index 326aa7f..5bae804 100644 --- a/src/String.cpp +++ b/src/String.cpp @@ -57,6 +57,11 @@ String::String(const std::string& s) : Node(PLIST_STRING) plist_set_string_val(_node, s.c_str()); } +String::String(const char *s) : Node(PLIST_STRING) +{ + plist_set_string_val(_node, s); +} + String::~String() { } |