Commit 74d4bf98 by Shahbaz Youssefi Committed by Commit Bot

Remove !empty() assert on FastVector::data()

The user of the API is allowed to call data() on an empty vector. Bug: 1026414 Change-Id: I41ea65c50b94115ace7930d75cd8f14782548d6c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1937807Reviewed-by: 's avatarJonah Ryan-Davis <jonahr@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
parent 95b176e4
...@@ -224,14 +224,12 @@ template <class T, size_t N, class Storage> ...@@ -224,14 +224,12 @@ template <class T, size_t N, class Storage>
ANGLE_INLINE typename FastVector<T, N, Storage>::const_pointer ANGLE_INLINE typename FastVector<T, N, Storage>::const_pointer
angle::FastVector<T, N, Storage>::data() const angle::FastVector<T, N, Storage>::data() const
{ {
ASSERT(!empty());
return mData; return mData;
} }
template <class T, size_t N, class Storage> template <class T, size_t N, class Storage>
ANGLE_INLINE typename FastVector<T, N, Storage>::pointer angle::FastVector<T, N, Storage>::data() ANGLE_INLINE typename FastVector<T, N, Storage>::pointer angle::FastVector<T, N, Storage>::data()
{ {
ASSERT(!empty());
return mData; return mData;
} }
......
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