summaryrefslogtreecommitdiff
path: root/library/Console-linux.cpp
diff options
context:
space:
mode:
authorAlexander Gavrilov2012-04-20 13:30:37 +0400
committerAlexander Gavrilov2012-04-20 13:30:37 +0400
commit0a6982f4041f43d571bd2690f148ff369f2d8038 (patch)
tree13d60514e341a3bafa36ffa7b8391d1eb5956e38 /library/Console-linux.cpp
parentd95cc3435fe249e1c86e5af36b8a10e9009edd97 (diff)
downloaddfhack-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.cpp11
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. */