let Deque::getItem return for each control path
Signed-off-by: DNKpp <DNKpp2011@gmail.com>
This commit is contained in:
parent
165097a161
commit
7eaaf6afb6
|
@ -92,7 +92,7 @@ class Deque {
|
||||||
T& getItem(size_t virtualIndex) const {
|
T& getItem(size_t virtualIndex) const {
|
||||||
|
|
||||||
// If the virtual index is valid
|
// If the virtual index is valid
|
||||||
if (virtualIndex < mSize) {
|
assert (virtualIndex < mSize);
|
||||||
|
|
||||||
size_t chunkIndex = mFirstChunkIndex;
|
size_t chunkIndex = mFirstChunkIndex;
|
||||||
size_t itemIndex = mFirstItemIndex;
|
size_t itemIndex = mFirstItemIndex;
|
||||||
|
@ -112,10 +112,6 @@ class Deque {
|
||||||
|
|
||||||
return mChunks[chunkIndex][itemIndex];
|
return mChunks[chunkIndex][itemIndex];
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
assert(false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Add more chunks
|
/// Add more chunks
|
||||||
void expandChunks(size_t atLeastNbChunks = 0) {
|
void expandChunks(size_t atLeastNbChunks = 0) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user