Skip to content

Commit

Permalink
Removed some unnecessary conversions
Browse files Browse the repository at this point in the history
  • Loading branch information
ME1312 committed Feb 22, 2023
1 parent 19dbfd3 commit 18de498
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Expand Up @@ -122,7 +122,7 @@ private void flush() {
}
}
private int flushMBB() throws IOException {
int size = Math.min((int) Math.floor((double) stored / MBB), 256);
int size = Math.min(stored / MBB, 256);
int length = size * MBB;
out.write('\u0013');
out.write((byte) (size - 1));
Expand All @@ -131,7 +131,7 @@ private int flushMBB() throws IOException {
return length;
}
private int flushKBB() throws IOException {
int size = Math.min((int) Math.floor((double) stored / KBB), 256);
int size = Math.min(stored / KBB, 256);
int length = size * KBB;
out.write('\u0012');
out.write((byte) (size - 1));
Expand All @@ -140,7 +140,7 @@ private int flushKBB() throws IOException {
return length;
}
private int flushBB() throws IOException {
int size = Math.min((int) Math.floor((double) stored / BB), 256);
int size = Math.min(stored / BB, 256);
int length = size * BB;
out.write('\u0011');
out.write((byte) (size - 1));
Expand Down
Expand Up @@ -122,7 +122,7 @@ private void flush() {
}
}
private int flushMBB() throws IOException {
int size = Math.min((int) Math.floor((double) stored / MBB), 256);
int size = Math.min(stored / MBB, 256);
int length = size * MBB;
out.write('\u0013');
out.write((byte) (size - 1));
Expand All @@ -131,7 +131,7 @@ private int flushMBB() throws IOException {
return length;
}
private int flushKBB() throws IOException {
int size = Math.min((int) Math.floor((double) stored / KBB), 256);
int size = Math.min(stored / KBB, 256);
int length = size * KBB;
out.write('\u0012');
out.write((byte) (size - 1));
Expand All @@ -140,7 +140,7 @@ private int flushKBB() throws IOException {
return length;
}
private int flushBB() throws IOException {
int size = Math.min((int) Math.floor((double) stored / BB), 256);
int size = Math.min(stored / BB, 256);
int length = size * BB;
out.write('\u0011');
out.write((byte) (size - 1));
Expand Down

0 comments on commit 18de498

Please sign in to comment.