From c2f66ac3c7d62082d38cc806bd86e15cebb9c6a7 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 4 Apr 2022 21:34:49 +0100 Subject: [PATCH] Fix String compatibility with std::map Closes #371 Signed-off-by: falkTX --- distrho/extra/String.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/distrho/extra/String.hpp b/distrho/extra/String.hpp index d9a91ca4..02383958 100644 --- 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: