summaryrefslogtreecommitdiff
path: root/src/commands.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-04-30 19:54:08 +0300
committerAndrei Karas <akaras@inbox.ru>2014-04-30 19:54:08 +0300
commitef7e7319305f040a47c483b71f2e78da7a1d6149 (patch)
tree14ac10427d7c94288fcb198db5277455754589ae /src/commands.cpp
parent12389c8441c748996962412201af9e21d66f9e55 (diff)
downloadplus-ef7e7319305f040a47c483b71f2e78da7a1d6149.tar.gz
plus-ef7e7319305f040a47c483b71f2e78da7a1d6149.tar.bz2
plus-ef7e7319305f040a47c483b71f2e78da7a1d6149.tar.xz
plus-ef7e7319305f040a47c483b71f2e78da7a1d6149.zip
Fix code style in other files.
Diffstat (limited to 'src/commands.cpp')
-rw-r--r--src/commands.cpp9
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')