diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-04-30 19:54:08 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-04-30 19:54:08 +0300 |
commit | ef7e7319305f040a47c483b71f2e78da7a1d6149 (patch) | |
tree | 14ac10427d7c94288fcb198db5277455754589ae /src/commands.cpp | |
parent | 12389c8441c748996962412201af9e21d66f9e55 (diff) | |
download | mv-ef7e7319305f040a47c483b71f2e78da7a1d6149.tar.gz mv-ef7e7319305f040a47c483b71f2e78da7a1d6149.tar.bz2 mv-ef7e7319305f040a47c483b71f2e78da7a1d6149.tar.xz mv-ef7e7319305f040a47c483b71f2e78da7a1d6149.zip |
Fix code style in other files.
Diffstat (limited to 'src/commands.cpp')
-rw-r--r-- | src/commands.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/commands.cpp b/src/commands.cpp index 3d476f8c6..ef1e2faac 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -1241,14 +1241,17 @@ impHandler0(createItems) if (id <= 500) continue; - const int colors = info->getColorsSize(); + int colors = info->getColorsSize(); + if (colors >= 255) + colors = 254; + if (!colors || serverVersion < 1) { dialog->addItem(id, 1, 100, 0); } else { - for (int f = 0; f < colors; f ++) + for (unsigned char f = 0; f < colors; f ++) { if (!info->getColor(f).empty()) dialog->addItem(id, f, 100, 0); @@ -1309,7 +1312,7 @@ static int uploadUpdate(void *ptr, if (chatWindow && (!tab || chatWindow->isTabPresent(tab))) { std::string str = Net::Download::getUploadResponse(); - const int sz = str.size(); + const size_t sz = str.size(); if (sz > 0) { if (str[sz - 1] == '\n') |