[Tizen] Add assertion to Vector
authorTaehyub Kim <taehyub.kim@samsung.com>
Mon, 8 Nov 2021 05:41:33 +0000 (14:41 +0900)
committerTaehyub Kim <taehyub.kim@samsung.com>
Mon, 8 Nov 2021 05:41:33 +0000 (14:41 +0900)
This reverts commit f0903fc96fd2cf9dc7cd9250f4aa76e209e95e7f.

dali/public-api/common/dali-vector.h

index fd4565e..4d90e2e 100644 (file)
@@ -19,6 +19,7 @@
  */
 
 // EXTERNAL INCLUDES
+#include <assert.h>
 #include <algorithm>
 #include <cstddef>
 #include <cstdint> // uint32_t
@@ -548,7 +549,8 @@ public: // API
   const ItemType& operator[](SizeType index) const
   {
     DALI_ASSERT_VECTOR(VectorBase::mData && "Vector is empty");
-    DALI_ASSERT_VECTOR(index < VectorBase::Count() && "Index out of bounds");
+    assert(index < VectorBase::Count());
+
     ItemType* address = reinterpret_cast<ItemType*>(VectorBase::mData);
     address += index;
     return *address;