Skip to content

Commit

Permalink
refa: shortens object equal cmp
Browse files Browse the repository at this point in the history
  • Loading branch information
TinyTinni committed Nov 3, 2024
1 parent 9382449 commit 0111369
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions tests/proptests/main_rapidcheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,8 @@ bool operator==(const tyti::vdf::object &rhs, const tyti::vdf::object &lhs)
{
if (rhs.name != lhs.name)
return false;
return true;
for (const auto &[k, v] : rhs.attribs)
{
auto itr = lhs.attribs.find(k);
if (itr == lhs.attribs.end())
return false;
if (itr->second != v)
return false;
}
if (rhs.attribs != lhs.attribs)
return false;
for (const auto &[k, v] : rhs.childs)
{
auto itr = lhs.childs.find(k);
Expand Down

0 comments on commit 0111369

Please sign in to comment.