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:
648e934
)
Revert "[Tizen] Prevent accessing invalid index"
author
dongsug.song
<dongsug.song@samsung.com>
Mon, 22 Nov 2021 07:35:25 +0000
(16:35 +0900)
committer
dongsug.song
<dongsug.song@samsung.com>
Mon, 22 Nov 2021 07:35:25 +0000
(16:35 +0900)
This reverts commit
648e934287d6bf7863c0c330d5052f0a34019771
.
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
b461e1e
..
fd4565e
100644
(file)
--- a/
dali/public-api/common/dali-vector.h
+++ b/
dali/public-api/common/dali-vector.h
@@
-548,11
+548,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;