From ef7e7319305f040a47c483b71f2e78da7a1d6149 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 30 Apr 2014 19:54:08 +0300 Subject: Fix code style in other files. --- src/commands.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/commands.cpp') 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') -- cgit v1.2.3-70-g09d2