projects
/
platform
/
core
/
uifw
/
dali-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a8fe876
)
[Tizen] Add assertion to Vector
author
Taehyub Kim
<taehyub.kim@samsung.com>
Mon, 8 Nov 2021 05:41:33 +0000
(14:41 +0900)
committer
Taehyub 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
patch
|
blob
|
history
diff --git
a/dali/public-api/common/dali-vector.h
b/dali/public-api/common/dali-vector.h
index
fd4565e
..
4d90e2e
100644
(file)
--- a/
dali/public-api/common/dali-vector.h
+++ b/
dali/public-api/common/dali-vector.h
@@
-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;