-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Performance improvements #2220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Performance improvements #2220
Changes from 9 commits
6d1ecc3
db866c2
f381097
45c4996
730d66e
87a5baa
47a9e95
b498f3f
f4206ee
e6c5018
c3e8791
2e05800
aae2469
616e0c7
cd3ae35
f749352
6e13257
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
stephengold marked this conversation as resolved.
Show resolved
Hide resolved
|
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. '0 + offset' should be replaced by 'offset'. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -744,8 +744,7 @@ else if (possibleMagic == DEFAULT_OBJECT) | |
|
|
||
| byte[] rVal = new byte[1 + size]; | ||
| rVal[0] = (byte) size; | ||
| for (int x = 1; x < rVal.length; x++) | ||
| rVal[x] = bytes[bytes.length - size - 1 + x]; | ||
| System.arraycopy(bytes, bytes.length - size - 1 + 1, rVal, 1, rVal.length - 1); | ||
|
||
|
|
||
| return rVal; | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -479,9 +479,8 @@ public static byte[] readData(byte[] store, int bytes, InputStream is) throws IO | |
| public static byte[] rightAlignBytes(byte[] bytes, int width) { | ||
| if (bytes.length != width) { | ||
| byte[] rVal = new byte[width]; | ||
| for (int x = width - bytes.length; x < width; x++) { | ||
| rVal[x] = bytes[x - (width - bytes.length)]; | ||
| } | ||
| if (width - (width - bytes.length) >= 0) | ||
| System.arraycopy(bytes, width - bytes.length - (width - bytes.length), rVal, width - bytes.length, width - (width - bytes.length)); | ||
|
||
| return rVal; | ||
| } | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.