From dd3d3bc6d06a6e5b6f8e3923a6e6dce204468461 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 14 Mar 2014 12:13:16 +0000 Subject: [PATCH] Add CarlaString operators back again, gcc is not that smart... --- source/utils/CarlaString.hpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) 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;