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:
be7619f
)
Revert "[Tizen] Prevent accessing invalid index"
author
Jaehyun Cho
<jae_hyun.cho@samsung.com>
Mon, 20 Dec 2021 09:35:26 +0000
(18:35 +0900)
committer
Jaehyun Cho
<jae_hyun.cho@samsung.com>
Mon, 20 Dec 2021 09:35:26 +0000
(18:35 +0900)
This reverts commit
be7619f2f1269ce30259f237014a1b0273711de5
.
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
471e8b4
..
80c6364
100644
(file)
--- a/
dali/public-api/common/dali-vector.h
+++ b/
dali/public-api/common/dali-vector.h
@@
-555,11
+555,7
@@
public: // API
const ItemType& operator[](SizeType index) const
{
DALI_ASSERT_VECTOR(VectorBase::mData && "Vector is empty");
- if(index >= VectorBase::Count())
- {
- // Prevent accessing invalid index
- index = 0;
- }
+ DALI_ASSERT_VECTOR(index < VectorBase::Count() && "Index out of bounds");
ItemType* address = reinterpret_cast<ItemType*>(VectorBase::mData);
address += index;
return *address;