commit c2f66ac3c7d62082d38cc806bd86e15cebb9c6a7
parent 347b5cf14f31428da2a33bfdc253db64ce0f9ff0
Author: falkTX <falktx@falktx.com>
Date: Mon, 4 Apr 2022 21:34:22 +0100
Fix String compatibility with std::map
Closes #371
Signed-off-by: falkTX <falktx@falktx.com>
Diffstat:
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/distrho/extra/String.hpp b/distrho/extra/String.hpp
@@ -869,6 +869,12 @@ public:
return operator+(str.fBuffer);
}
+ // needed for std::map compatibility
+ bool operator<(const String& str) const noexcept
+ {
+ return std::strcmp(fBuffer, str.fBuffer) < 0;
+ }
+
// -------------------------------------------------------------------
private: