diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2013-08-22 12:18:14 -0700 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2013-08-22 12:18:14 -0700 |
commit | 97f5effe3a56b9c395b20624b2a141ab84a625f8 (patch) | |
tree | a53cd10356d582d0cb572c73600bc77c2fc2417b | |
parent | fcae49e764093351cb29692286db9ca6afe7a39f (diff) | |
download | tmwa-97f5effe3a56b9c395b20624b2a141ab84a625f8.tar.gz tmwa-97f5effe3a56b9c395b20624b2a141ab84a625f8.tar.bz2 tmwa-97f5effe3a56b9c395b20624b2a141ab84a625f8.tar.xz tmwa-97f5effe3a56b9c395b20624b2a141ab84a625f8.zip |
Fix an overzealous warning on 32-bit systems
-rw-r--r-- | src/common/utils2.hpp | 7 | ||||
-rw-r--r-- | src/login/login.cpp | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/common/utils2.hpp b/src/common/utils2.hpp index 119cc13..978ae54 100644 --- a/src/common/utils2.hpp +++ b/src/common/utils2.hpp @@ -277,4 +277,11 @@ T base_cast(U&& u) return std::forward<U>(u); } +// use this when e.g. U is an int of unknown size +template<class T, class U> +T maybe_cast(U u) +{ + return u; +} + #endif // UTILS2_HPP diff --git a/src/login/login.cpp b/src/login/login.cpp index 031abd7..e09f96b 100644 --- a/src/login/login.cpp +++ b/src/login/login.cpp @@ -3792,7 +3792,7 @@ void save_config_in_log(void) LOGIN_LOG("- to NOT check GM accounts file modifications.\n"); else LOGIN_LOG("- to check GM accounts file modifications every %lld seconds.\n", - static_cast<long long>(gm_account_filename_check_timer.count())); + maybe_cast<long long>(gm_account_filename_check_timer.count())); // not necessary to log the 'login_log_filename', we are inside :) |