diff options
| author | Alexander Gavrilov | 2012-04-20 13:30:37 +0400 |
|---|---|---|
| committer | Alexander Gavrilov | 2012-04-20 13:30:37 +0400 |
| commit | 0a6982f4041f43d571bd2690f148ff369f2d8038 (patch) | |
| tree | 13d60514e341a3bafa36ffa7b8391d1eb5956e38 /library/Console-linux.cpp | |
| parent | d95cc3435fe249e1c86e5af36b8a10e9009edd97 (diff) | |
| download | dfhack-0a6982f4041f43d571bd2690f148ff369f2d8038.tar.gz dfhack-0a6982f4041f43d571bd2690f148ff369f2d8038.tar.bz2 dfhack-0a6982f4041f43d571bd2690f148ff369f2d8038.tar.xz | |
Enable warnings correctly on linux and fix a lot of them.
Diffstat (limited to 'library/Console-linux.cpp')
| -rw-r--r-- | library/Console-linux.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/library/Console-linux.cpp b/library/Console-linux.cpp index 9a090564..3c0ad893 100644 --- a/library/Console-linux.cpp +++ b/library/Console-linux.cpp @@ -163,6 +163,7 @@ namespace DFHack return false; return true; } + return false; } public: @@ -489,7 +490,7 @@ namespace DFHack { right_arrow: /* right arrow */ - if (raw_cursor != raw_buffer.size()) + if (size_t(raw_cursor) != raw_buffer.size()) { raw_cursor++; prompt_refresh(); @@ -510,7 +511,7 @@ namespace DFHack history_index = 0; break; } - else if (history_index >= history.size()) + else if (size_t(history_index) >= history.size()) { history_index = history.size()-1; break; @@ -545,7 +546,7 @@ namespace DFHack if (seq[1] == '3' && seq2 == '~' ) { // delete - if (raw_buffer.size() > 0 && raw_cursor < raw_buffer.size()) + if (raw_buffer.size() > 0 && size_t(raw_cursor) < raw_buffer.size()) { raw_buffer.erase(raw_cursor,1); prompt_refresh(); @@ -555,11 +556,11 @@ namespace DFHack } break; default: - if (raw_buffer.size() == raw_cursor) + if (raw_buffer.size() == size_t(raw_cursor)) { raw_buffer.append(1,c); raw_cursor++; - if (plen+raw_buffer.size() < get_columns()) + if (plen+raw_buffer.size() < size_t(get_columns())) { /* Avoid a full update of the line in the * trivial case. */ |
