diff options
author | Yuri Gorshenin <y@maps.me> | 2017-06-22 14:55:24 +0300 |
---|---|---|
committer | Yuri Gorshenin <mipt.vi002@gmail.com> | 2017-07-05 16:41:38 +0300 |
commit | 0df4620d1e2f1c0db9d0585856043dd1353bd706 (patch) | |
tree | 46a38905b270204be0e9181b1fdf05c8fa72fecb /ugc | |
parent | 01dd3625451f70d6f3c81a202fc9db4e02d236d8 (diff) |
[ugc] Warning fix.
Diffstat (limited to 'ugc')
-rw-r--r-- | ugc/types.hpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ugc/types.hpp b/ugc/types.hpp index 343f6d82c7..fd746d029d 100644 --- a/ugc/types.hpp +++ b/ugc/types.hpp @@ -61,7 +61,8 @@ inline uint32_t DaysAgo(Time const & time) auto const now = std::chrono::system_clock::now(); if (now < time) return 0; - return std::chrono::duration_cast<std::chrono::hours>(now - time).count() / 24; + auto const h = std::chrono::duration_cast<std::chrono::hours>(now - time).count() / 24; + return static_cast<uint32_t>(h); } struct RatingRecord |