diff --git a/source/utils/CarlaString.hpp b/source/utils/CarlaString.hpp index 366ded3ff..8f8e35028 100644 --- a/source/utils/CarlaString.hpp +++ b/source/utils/CarlaString.hpp @@ -575,11 +575,21 @@ public: return (strBuf != nullptr && std::strcmp(fBuffer, strBuf) == 0); } + bool operator==(const CarlaString& str) const noexcept + { + return operator==(str.fBuffer); + } + bool operator!=(const char* const strBuf) const noexcept { return !operator==(strBuf); } + bool operator!=(const CarlaString& str) const noexcept + { + return !operator==(str.fBuffer); + } + CarlaString& operator=(const char* const strBuf) noexcept { _dup(strBuf); @@ -587,6 +597,13 @@ public: return *this; } + CarlaString& operator=(const CarlaString& str) noexcept + { + _dup(str.fBuffer); + + return *this; + } + CarlaString& operator+=(const char* const strBuf) noexcept { if (strBuf == nullptr) @@ -603,6 +620,11 @@ public: return *this; } + CarlaString& operator+=(const CarlaString& str) noexcept + { + return operator+=(str.fBuffer); + } + CarlaString operator+(const char* const strBuf) noexcept { const size_t newBufSize = fBufferLen + ((strBuf != nullptr) ? std::strlen(strBuf) : 0) + 1;