Skip to content

Commit

Permalink
DPL: more operator== ambiguities fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
ktf committed Nov 24, 2023
1 parent 1b58a8f commit f5f18ff
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions Framework/Core/include/Framework/ASoA.h
Original file line number Diff line number Diff line change
Expand Up @@ -614,14 +614,14 @@ struct DefaultIndexPolicy : IndexPolicyBase {
this->setCursor(mMaxRow);
}

bool operator!=(DefaultIndexPolicy const& other) const
friend bool operator!=(DefaultIndexPolicy const& lh, DefaultIndexPolicy const& rh)
{
return O2_BUILTIN_LIKELY(this->mRowIndex != other.mRowIndex);
return O2_BUILTIN_LIKELY(lh.mRowIndex != rh.mRowIndex);
}

bool operator==(DefaultIndexPolicy const& other) const
friend bool operator==(DefaultIndexPolicy const& lh, DefaultIndexPolicy const& rh)
{
return O2_BUILTIN_UNLIKELY(this->mRowIndex == other.mRowIndex);
return O2_BUILTIN_UNLIKELY(lh.mRowIndex == rh.mRowIndex);
}

bool operator!=(RowViewSentinel const& sentinel) const
Expand Down
8 changes: 4 additions & 4 deletions Framework/Core/include/Framework/ASoAHelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -1253,13 +1253,13 @@ struct CombinationsGenerator {
{
return this->mCurrent;
}
bool operator==(const CombinationsIterator& rh)
friend bool operator==(const CombinationsIterator& lh, const CombinationsIterator& rh)
{
return (this->mIsEnd && rh.mIsEnd) || (this->mCurrent == rh.mCurrent);
return (lh.mIsEnd && rh.mIsEnd) || (lh.mCurrent == rh.mCurrent);
}
bool operator!=(const CombinationsIterator& rh)
friend bool operator!=(const CombinationsIterator& lh, const CombinationsIterator& rh)
{
return !(*this == rh);
return !(lh == rh);
}
};

Expand Down

0 comments on commit f5f18ff

Please sign in to comment.