Skip to content

Commit

Permalink
Fix String compatibility with std::map
Browse files Browse the repository at this point in the history
Closes #371

Signed-off-by: falkTX <falktx@falktx.com>
  • Loading branch information
falkTX committed Apr 4, 2022
1 parent 347b5cf commit c2f66ac
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions distrho/extra/String.hpp
Expand Up @@ -869,6 +869,12 @@ class String
return operator+(str.fBuffer);
}

// needed for std::map compatibility
bool operator<(const String& str) const noexcept
{
return std::strcmp(fBuffer, str.fBuffer) < 0;
}

// -------------------------------------------------------------------

private:
Expand Down

0 comments on commit c2f66ac

Please sign in to comment.