Returned VanillaContext entry indirection in order to make patterns like map.getUsing(key, byteableValue) working

This commit is contained in:
leventov
2015-01-25 08:55:52 +07:00
parent 6d0b305051
commit 3842755c67
4 changed files with 9 additions and 4 deletions
@@ -1807,8 +1807,8 @@ class VanillaContext<K, KI, MKI extends MetaBytesInterop<K, ? super KI>,
final MultiStoreBytes reuse(MultiStoreBytes entry, long pos) {
long offsetWithinEntrySpace = pos * m.chunkSize;
entry.storePositionAndSize(m.ms, entrySpaceOffset + offsetWithinEntrySpace,
m.segmentEntrySpaceInnerSize - offsetWithinEntrySpace);
entry.setBytesOffset(m.bytes, entrySpaceOffset + offsetWithinEntrySpace);
entry.limit(m.segmentEntrySpaceInnerSize - offsetWithinEntrySpace);
entry.position(m.metaDataBytes);
return entry;
}