diff options
author | 2025-04-06 11:48:14 +0200 | |
---|---|---|
committer | 2025-04-06 11:48:14 +0200 | |
commit | ed8a73301b844bf5f7efd9cd437c9c0765a49a88 (patch) | |
tree | 803d3f9bc1b08bba8ad5f921da42f42c297a9905 /src/String.cpp | |
parent | 31f1a810e5264ef970bab17d517692ef906470e1 (diff) | |
download | libplist-ed8a73301b844bf5f7efd9cd437c9c0765a49a88.tar.gz libplist-ed8a73301b844bf5f7efd9cd437c9c0765a49a88.tar.bz2 |
C++: Add = operator to String class
Diffstat (limited to 'src/String.cpp')
-rw-r--r-- | src/String.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/String.cpp b/src/String.cpp index 5bae804..8daec0f 100644 --- a/src/String.cpp +++ b/src/String.cpp @@ -45,6 +45,13 @@ String& String::operator=(const PList::String& s) return *this; } +String& String::operator=(const std::string& s) +{ + plist_free(_node); + _node = plist_new_string(s.c_str()); + return *this; +} + String& String::operator=(const char* s) { plist_free(_node); |