Skip to content

Fix ArrayBase::operator!= for equal arrays#2420

Open
cuiweixie wants to merge 1 commit intobeefytech:masterfrom
cuiweixie:fix/arraybase-operator-ne-equals
Open

Fix ArrayBase::operator!= for equal arrays#2420
cuiweixie wants to merge 1 commit intobeefytech:masterfrom
cuiweixie:fix/arraybase-operator-ne-equals

Conversation

@cuiweixie
Copy link
Copy Markdown

Summary

ArrayBase::operator!= returned true in the success path when both arrays had the same size and elements. The final return should be false when all pairs match.

Change

  • BeefySysLib/util/Array.h: last branch of operator!= now returns false when contents are equal.

Matches the same logic as operator== (equal sequences are not unequal).

The last branch returned true when sizes and elements matched; return false
so equal arrays compare unequal only when they actually differ.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant