summaryrefslogtreecommitdiff
path: root/src/gui/windows/whoisonline.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-07 16:18:13 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-07 16:18:13 +0300
commit9fe21fcd8883b37bdc30224822e6e42afb35b8f0 (patch)
tree798117abd4dc7e610997d59d530a96ddc1509f53 /src/gui/windows/whoisonline.cpp
parent4429cb14e9e187edef27aba692a4266733f79c17 (diff)
downloadmanaplus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.gz
manaplus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.bz2
manaplus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.xz
manaplus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.zip
Replace most static_cast<Type> to shorter versions from defines.
Diffstat (limited to 'src/gui/windows/whoisonline.cpp')
-rw-r--r--src/gui/windows/whoisonline.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/windows/whoisonline.cpp b/src/gui/windows/whoisonline.cpp
index d51af6b05..e5a803a29 100644
--- a/src/gui/windows/whoisonline.cpp
+++ b/src/gui/windows/whoisonline.cpp
@@ -459,7 +459,7 @@ void WhoIsOnline::loadWebList()
level = 0;
OnlinePlayer *const player = new OnlinePlayer(nick,
- static_cast<unsigned char>(255), level,
+ CAST_U8(255), level,
Gender::UNSPECIFIED, -1);
mOnlinePlayers.insert(player);
mOnlineNicks.insert(nick);
@@ -502,11 +502,11 @@ size_t WhoIsOnline::memoryWrite(void *restrict ptr,
reinterpret_cast<WhoIsOnline *restrict>(stream);
const size_t totalMem = size * nmemb;
wio->mMemoryBuffer = static_cast<char*>(realloc(wio->mMemoryBuffer,
- static_cast<size_t>(wio->mDownloadedBytes) + totalMem));
+ CAST_SIZE(wio->mDownloadedBytes) + totalMem));
if (wio->mMemoryBuffer)
{
memcpy(&(wio->mMemoryBuffer[wio->mDownloadedBytes]), ptr, totalMem);
- wio->mDownloadedBytes += static_cast<int>(totalMem);
+ wio->mDownloadedBytes += CAST_S32(totalMem);
}
return totalMem;
@@ -570,7 +570,7 @@ int WhoIsOnline::downloadThread(void *ptr)
case CURLE_COULDNT_CONNECT:
default:
std::cerr << "curl error "
- << static_cast<unsigned>(res) << ": "
+ << CAST_U32(res) << ": "
<< wio->mCurlError << " host: "
<< url.c_str() << std::endl;
break;