Skip to content

Commit

Permalink
Move operator==(const GncGUID&, const GncGUID&) to guid.[ch]pp.
Browse files Browse the repository at this point in the history
  • Loading branch information
jralls committed Mar 18, 2023
1 parent 352ab8a commit 00c560d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
6 changes: 0 additions & 6 deletions libgnucash/engine/gnc-option-impl.cpp
Expand Up @@ -223,12 +223,6 @@ GncOptionQofInstanceValue::reset_default_value()
m_value = m_default_value;
}

static bool
operator==(const GncGUID& l, const GncGUID& r)
{
return guid_equal(&l, &r);
}

bool
GncOptionQofInstanceValue::is_changed() const noexcept
{
Expand Down
7 changes: 7 additions & 0 deletions libgnucash/engine/guid.cpp
Expand Up @@ -23,6 +23,7 @@
\********************************************************************/

#include "guid.hpp"
#include "guid.h"

#ifdef HAVE_CONFIG_H
# include <config.h>
Expand Down Expand Up @@ -431,3 +432,9 @@ GUID::operator GncGUID () const noexcept
}

} // namespace gnc

bool
operator==(const GncGUID& lhs, const GncGUID& rhs)
{
return gnc::GUID{lhs} == gnc::GUID{rhs};
}
4 changes: 3 additions & 1 deletion libgnucash/engine/guid.hpp
Expand Up @@ -62,5 +62,7 @@ bool operator != (GUID const &, GUID const &) noexcept;
bool operator == (GUID const &, GncGUID const &) noexcept;


}
} // namespace gnc

bool operator== (const GncGUID&, const GncGUID&);
#endif

0 comments on commit 00c560d

Please sign in to comment.