diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-02-07 16:18:13 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-02-07 16:18:13 +0300 |
commit | 9fe21fcd8883b37bdc30224822e6e42afb35b8f0 (patch) | |
tree | 798117abd4dc7e610997d59d530a96ddc1509f53 /src/client.cpp | |
parent | 4429cb14e9e187edef27aba692a4266733f79c17 (diff) | |
download | mv-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.gz mv-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.bz2 mv-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.xz mv-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.zip |
Replace most static_cast<Type> to shorter versions from defines.
Diffstat (limited to 'src/client.cpp')
-rw-r--r-- | src/client.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/client.cpp b/src/client.cpp index c4d879355..9a2494bc0 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -439,8 +439,8 @@ void Client::gameInit() if (mCurrentServer.port == 0) { - mCurrentServer.port = static_cast<uint16_t>(branding.getValue( - "defaultPort", static_cast<int>(DEFAULT_PORT))); + mCurrentServer.port = CAST_U16(branding.getValue( + "defaultPort", CAST_S32(DEFAULT_PORT))); mCurrentServer.type = ServerInfo::parseType( branding.getValue("defaultServerType", "tmwathena")); } @@ -465,7 +465,7 @@ void Client::gameInit() settings.guiAlpha = config.getFloatValue("guialpha"); optionChanged("fpslimit"); - start_time = static_cast<int>(time(nullptr)); + start_time = CAST_S32(time(nullptr)); PlayerInfo::init(); @@ -880,7 +880,7 @@ int Client::gameExec() BLOCK_START("Client::gameExec 4") if (gui) gui->logic(); - cur_time = static_cast<int>(time(nullptr)); + cur_time = CAST_S32(time(nullptr)); int k = 0; while (lastTickTime != tick_time && k < 40) @@ -1094,7 +1094,7 @@ int Client::gameExec() mSearchHash = Net::Download::adlerBuffer( const_cast<char*>(mCurrentServer.hostname.c_str()), - static_cast<int>(mCurrentServer.hostname.size())); + CAST_S32(mCurrentServer.hostname.size())); if (settings.options.username.empty() || settings.options.password.empty()) { @@ -1929,8 +1929,8 @@ void Client::extractAssets() for (int f = 0; f < 100; f ++) { std::string part = strprintf("manaplus-data.zip%u%u", - static_cast<unsigned int>(f / 10), - static_cast<unsigned int>(f % 10)); + CAST_U32(f / 10), + CAST_U32(f % 10)); logger->log("testing asset: " + part); SDL_RWops *const rw = SDL_RWFromFile(part.c_str(), "r"); if (rw) |