Skip to content

Commit

Permalink
fix error: use of overloaded operator '==' is ambiguous
Browse files Browse the repository at this point in the history
  • Loading branch information
scheffle committed Dec 24, 2023
1 parent 8f2f880 commit 21678b5
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions vstgui/lib/cstring.h
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,9 @@ class UTF8StringView
bool operator== (const UTF8StringPtr otherString) const;
bool operator!= (const UTF8StringPtr otherString) const;
bool operator== (UTF8StringView otherString) const;
bool operator!= (UTF8StringView otherString) const;
bool operator== (const UTF8String& otherString) const;
bool operator!= (const UTF8String& otherString) const;
operator const UTF8StringPtr () const;
//-----------------------------------------------------------------------------
private:
Expand Down Expand Up @@ -463,6 +466,26 @@ inline bool UTF8StringView::operator== (UTF8StringView otherString) const
return operator==(otherString.str);
}

//------------------------------------------------------------------------
inline bool UTF8StringView::operator!= (UTF8StringView otherString) const
{
if (byteCount && otherString.byteCount && *byteCount != *otherString.byteCount)
return true;
return operator!= (otherString.str);
}

//------------------------------------------------------------------------
inline bool UTF8StringView::operator== (const UTF8String& otherString) const
{
return otherString == str;
}

//------------------------------------------------------------------------
inline bool UTF8StringView::operator!= (const UTF8String& otherString) const
{
return otherString != str;
}

//-----------------------------------------------------------------------------
inline UTF8StringView::operator const UTF8StringPtr () const
{
Expand Down

0 comments on commit 21678b5

Please sign in to comment.