From a8b6d8e18765116c9f6d36c0baaad1d38349ddd2 Mon Sep 17 00:00:00 2001 From: tscholb Date: Mon, 1 Nov 2021 16:34:36 +0900 Subject: [PATCH] [Tizen] Add assertion to Vector 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 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dali/public-api/common/dali-vector.h b/dali/public-api/common/dali-vector.h index fd4565e..4d90e2e 100644 --- a/dali/public-api/common/dali-vector.h +++ b/dali/public-api/common/dali-vector.h @@ -19,6 +19,7 @@ */ // EXTERNAL INCLUDES +#include #include #include #include // 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(VectorBase::mData); address += index; return *address; -- 2.7.4