Skip to content

Commit dd697ee

Browse files
authored
Remove compilation warnings (#816)
1 parent e00a837 commit dd697ee

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

terminal-jansi/src/main/java/org/jline/terminal/impl/jansi/win/WindowsAnsiWriter.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -196,28 +196,28 @@ protected void processEraseLine(int eraseOption) throws IOException {
196196
protected void processCursorUpLine(int count) throws IOException {
197197
getConsoleInfo();
198198
info.cursorPosition.x = 0;
199-
info.cursorPosition.y -= count;
199+
info.cursorPosition.y -= (short) count;
200200
applyCursorPosition();
201201
}
202202

203203
protected void processCursorDownLine(int count) throws IOException {
204204
getConsoleInfo();
205205
info.cursorPosition.x = 0;
206-
info.cursorPosition.y += count;
206+
info.cursorPosition.y += (short) count;
207207
applyCursorPosition();
208208
}
209209

210210
@Override
211211
protected void processCursorLeft(int count) throws IOException {
212212
getConsoleInfo();
213-
info.cursorPosition.x -= count;
213+
info.cursorPosition.x -= (short) count;
214214
applyCursorPosition();
215215
}
216216

217217
@Override
218218
protected void processCursorRight(int count) throws IOException {
219219
getConsoleInfo();
220-
info.cursorPosition.x += count;
220+
info.cursorPosition.x += (short) count;
221221
applyCursorPosition();
222222
}
223223

@@ -226,7 +226,7 @@ protected void processCursorDown(int count) throws IOException {
226226
getConsoleInfo();
227227
int nb = Math.max(0, info.cursorPosition.y + count - info.size.y + 1);
228228
if (nb != count) {
229-
info.cursorPosition.y += count;
229+
info.cursorPosition.y += (short) count;
230230
applyCursorPosition();
231231
}
232232
if (nb > 0) {
@@ -245,7 +245,7 @@ protected void processCursorDown(int count) throws IOException {
245245
@Override
246246
protected void processCursorUp(int count) throws IOException {
247247
getConsoleInfo();
248-
info.cursorPosition.y -= count;
248+
info.cursorPosition.y -= (short) count;
249249
applyCursorPosition();
250250
}
251251

terminal-jna/src/main/java/org/jline/terminal/impl/jna/win/WindowsAnsiWriter.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -183,34 +183,34 @@ protected void processEraseLine(int eraseOption) throws IOException {
183183
protected void processCursorUpLine(int count) throws IOException {
184184
getConsoleInfo();
185185
info.dwCursorPosition.X = 0;
186-
info.dwCursorPosition.Y -= count;
186+
info.dwCursorPosition.Y -= (short) count;
187187
applyCursorPosition();
188188
}
189189

190190
protected void processCursorDownLine(int count) throws IOException {
191191
getConsoleInfo();
192192
info.dwCursorPosition.X = 0;
193-
info.dwCursorPosition.Y += count;
193+
info.dwCursorPosition.Y += (short) count;
194194
applyCursorPosition();
195195
}
196196

197197
protected void processCursorLeft(int count) throws IOException {
198198
getConsoleInfo();
199-
info.dwCursorPosition.X -= count;
199+
info.dwCursorPosition.X -= (short) count;
200200
applyCursorPosition();
201201
}
202202

203203
protected void processCursorRight(int count) throws IOException {
204204
getConsoleInfo();
205-
info.dwCursorPosition.X += count;
205+
info.dwCursorPosition.X += (short) count;
206206
applyCursorPosition();
207207
}
208208

209209
protected void processCursorDown(int count) throws IOException {
210210
getConsoleInfo();
211211
int nb = Math.max(0, info.dwCursorPosition.Y + count - info.dwSize.Y + 1);
212212
if (nb != count) {
213-
info.dwCursorPosition.Y += count;
213+
info.dwCursorPosition.Y += (short) count;
214214
applyCursorPosition();
215215
}
216216
if (nb > 0) {
@@ -226,7 +226,7 @@ protected void processCursorDown(int count) throws IOException {
226226

227227
protected void processCursorUp(int count) throws IOException {
228228
getConsoleInfo();
229-
info.dwCursorPosition.Y -= count;
229+
info.dwCursorPosition.Y -= (short) count;
230230
applyCursorPosition();
231231
}
232232

0 commit comments

Comments
 (0)