[Tizen] Add assertion to Vector
authortscholb <scholb.kim@samsung.com>
Mon, 1 Nov 2021 07:34:36 +0000 (16:34 +0900)
committertscholb <scholb.kim@samsung.com>
Mon, 1 Nov 2021 07:36:17 +0000 (16:36 +0900)
This reverts commit 33a8f601e33017f8cacdb66c1261f185faab5e8f.

[Tizen] Add comment

This reverts commit 442b2b225b53fb1b04ade3193a94b3f9afd49779.

[Tizen] Remove throwing exception

This reverts commit fce5b62c25ff8e205a059e24c53b8e0161ddc2f0.

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;