diff --git a/libgnucash/engine/guid.cpp b/libgnucash/engine/guid.cpp index 43b32fbeee..c58b49ac95 100644 --- a/libgnucash/engine/guid.cpp +++ b/libgnucash/engine/guid.cpp @@ -412,9 +412,7 @@ GUID::operator < (GUID const & other) noexcept bool operator == (GUID const & lhs, GncGUID const & rhs) noexcept { - auto ret = std::mismatch (lhs.begin (), lhs.end (), rhs.reserved); - return ret.first == lhs.end (); - + return lhs.implementation == GUID(rhs).implementation; } bool diff --git a/libgnucash/engine/guid.hpp b/libgnucash/engine/guid.hpp index 837d509920..3a79852af7 100644 --- a/libgnucash/engine/guid.hpp +++ b/libgnucash/engine/guid.hpp @@ -55,6 +55,7 @@ struct GUID auto begin () const noexcept -> decltype (implementation.begin ()); auto end () const noexcept -> decltype (implementation.end ()); bool operator < (GUID const &) noexcept; + friend bool operator == (GUID const &, GncGUID const &) noexcept; friend bool operator != (GUID const &, GUID const &) noexcept; };