Skip to content

Commit

Permalink
Remove compilation warnings (#816)
Browse files Browse the repository at this point in the history
  • Loading branch information
gnodet committed Jan 16, 2023
1 parent e00a837 commit dd697ee
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -196,28 +196,28 @@ protected void processEraseLine(int eraseOption) throws IOException {
protected void processCursorUpLine(int count) throws IOException {
getConsoleInfo();
info.cursorPosition.x = 0;
info.cursorPosition.y -= count;
info.cursorPosition.y -= (short) count;
applyCursorPosition();
}

protected void processCursorDownLine(int count) throws IOException {
getConsoleInfo();
info.cursorPosition.x = 0;
info.cursorPosition.y += count;
info.cursorPosition.y += (short) count;
applyCursorPosition();
}

@Override
protected void processCursorLeft(int count) throws IOException {
getConsoleInfo();
info.cursorPosition.x -= count;
info.cursorPosition.x -= (short) count;
applyCursorPosition();
}

@Override
protected void processCursorRight(int count) throws IOException {
getConsoleInfo();
info.cursorPosition.x += count;
info.cursorPosition.x += (short) count;
applyCursorPosition();
}

Expand All @@ -226,7 +226,7 @@ protected void processCursorDown(int count) throws IOException {
getConsoleInfo();
int nb = Math.max(0, info.cursorPosition.y + count - info.size.y + 1);
if (nb != count) {
info.cursorPosition.y += count;
info.cursorPosition.y += (short) count;
applyCursorPosition();
}
if (nb > 0) {
Expand All @@ -245,7 +245,7 @@ protected void processCursorDown(int count) throws IOException {
@Override
protected void processCursorUp(int count) throws IOException {
getConsoleInfo();
info.cursorPosition.y -= count;
info.cursorPosition.y -= (short) count;
applyCursorPosition();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,34 +183,34 @@ protected void processEraseLine(int eraseOption) throws IOException {
protected void processCursorUpLine(int count) throws IOException {
getConsoleInfo();
info.dwCursorPosition.X = 0;
info.dwCursorPosition.Y -= count;
info.dwCursorPosition.Y -= (short) count;
applyCursorPosition();
}

protected void processCursorDownLine(int count) throws IOException {
getConsoleInfo();
info.dwCursorPosition.X = 0;
info.dwCursorPosition.Y += count;
info.dwCursorPosition.Y += (short) count;
applyCursorPosition();
}

protected void processCursorLeft(int count) throws IOException {
getConsoleInfo();
info.dwCursorPosition.X -= count;
info.dwCursorPosition.X -= (short) count;
applyCursorPosition();
}

protected void processCursorRight(int count) throws IOException {
getConsoleInfo();
info.dwCursorPosition.X += count;
info.dwCursorPosition.X += (short) count;
applyCursorPosition();
}

protected void processCursorDown(int count) throws IOException {
getConsoleInfo();
int nb = Math.max(0, info.dwCursorPosition.Y + count - info.dwSize.Y + 1);
if (nb != count) {
info.dwCursorPosition.Y += count;
info.dwCursorPosition.Y += (short) count;
applyCursorPosition();
}
if (nb > 0) {
Expand All @@ -226,7 +226,7 @@ protected void processCursorDown(int count) throws IOException {

protected void processCursorUp(int count) throws IOException {
getConsoleInfo();
info.dwCursorPosition.Y -= count;
info.dwCursorPosition.Y -= (short) count;
applyCursorPosition();
}

Expand Down

0 comments on commit dd697ee

Please sign in to comment.