Commit 3500b434 by Mohan Maiya Committed by Commit Bot

Update assert in BitSetArray::Iterator::prepareCopy

Prior to a mutation of the bitset, mCurrentIterator would have been from mParent but post-mutation subsequent iterators are obtained from mParentCopy. Assert that the end() markers for both containers are the same. Bug: angleproject:3877 Change-Id: Ia29abd2acc0014522ef5856a88d8ec227cf9f19d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2693813Reviewed-by: 's avatarShahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
parent 12990d73
...@@ -546,8 +546,8 @@ class BitSetArray final ...@@ -546,8 +546,8 @@ class BitSetArray final
private: private:
ANGLE_INLINE void prepareCopy() ANGLE_INLINE void prepareCopy()
{ {
ASSERT(mParent.mBaseBitSetArray[mParent.kArraySize - 1].end() == ASSERT(mParent.mBaseBitSetArray[mIndex].end() ==
mParentCopy.mBaseBitSetArray[mParent.kArraySize - 1].end()); mParentCopy.mBaseBitSetArray[mIndex].end());
if (mParentCopy.none()) if (mParentCopy.none())
{ {
mParentCopy = mParent; mParentCopy = mParent;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment