| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Please add the bug-fix label. |
Sorry, something went wrong.
…(hashCode) and offsetBuffer with SIZE_WIDTH (setSize) plus refactoring to avoid code duplication in ListViewVector
There was a problem hiding this comment.
It looks good to me.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
What's Changed
First commit changes logic:
Before:
public int getElementEndIndex(int index) { return sizeBuffer.getInt(index * OFFSET_WIDTH); }After:
public int getElementEndIndex(int index) { return offsetBuffer.getInt(index * OFFSET_WIDTH) + sizeBuffer.getInt(index * SIZE_WIDTH); }Second commit doesn't change logic:
Fixes a bug of usage sizeBuffer with OFFSET_WIDTH (hashCode method) and offsetBuffer with SIZE_WIDTH (setSize method). It doesn't introduce real changes in the logic as OFFSET_WIDTH == SIZE_WIDTH == 4
Plus small refactoring of ListViewVector to avoid code duplication and similar issues in the future.
It's a bug fix.
Closes #470.