Removed redundant local variable (#10858)
Motivation: Found a redundant local variable. Modification: Removed the local variable. Result: Minor performance improvement.
This commit is contained in:
parent
4f7e6d4841
commit
c22cd7c347
@ -1315,13 +1315,12 @@ public final class ByteBufUtil {
|
|||||||
NEWLINE + " | 0 1 2 3 4 5 6 7 8 9 a b c d e f |" +
|
NEWLINE + " | 0 1 2 3 4 5 6 7 8 9 a b c d e f |" +
|
||||||
NEWLINE + "+--------+-------------------------------------------------+----------------+");
|
NEWLINE + "+--------+-------------------------------------------------+----------------+");
|
||||||
|
|
||||||
final int startIndex = offset;
|
|
||||||
final int fullRows = length >>> 4;
|
final int fullRows = length >>> 4;
|
||||||
final int remainder = length & 0xF;
|
final int remainder = length & 0xF;
|
||||||
|
|
||||||
// Dump the rows which have 16 bytes.
|
// Dump the rows which have 16 bytes.
|
||||||
for (int row = 0; row < fullRows; row ++) {
|
for (int row = 0; row < fullRows; row ++) {
|
||||||
int rowStartIndex = (row << 4) + startIndex;
|
int rowStartIndex = (row << 4) + offset;
|
||||||
|
|
||||||
// Per-row prefix.
|
// Per-row prefix.
|
||||||
appendHexDumpRowPrefix(dump, row, rowStartIndex);
|
appendHexDumpRowPrefix(dump, row, rowStartIndex);
|
||||||
@ -1342,7 +1341,7 @@ public final class ByteBufUtil {
|
|||||||
|
|
||||||
// Dump the last row which has less than 16 bytes.
|
// Dump the last row which has less than 16 bytes.
|
||||||
if (remainder != 0) {
|
if (remainder != 0) {
|
||||||
int rowStartIndex = (fullRows << 4) + startIndex;
|
int rowStartIndex = (fullRows << 4) + offset;
|
||||||
appendHexDumpRowPrefix(dump, fullRows, rowStartIndex);
|
appendHexDumpRowPrefix(dump, fullRows, rowStartIndex);
|
||||||
|
|
||||||
// Hex dump
|
// Hex dump
|
||||||
|
Loading…
x
Reference in New Issue
Block a user