Fix implicit conversion warnings in MemoryIdler.h
Summary: The build with Clang 10 on iOS broke with the following errors: ``` folly/detail/MemoryIdler.h:86:68: error: implicit conversion from 'uint64_t' (aka 'unsigned long long') to 'float' may lose precision [-Werror,-Wimplicit-int-float-conversion] static_cast<float>(std::numeric_limits<uint64_t>::max()) * h; ~ ^ ``` ``` folly/detail/MemoryIdler.h:87:38: error: implicit conversion from 'std::__1::chrono::duration<long long, std::__1::ratio<1, 1000000000> >::rep' (aka 'long long') to 'float' may lose precision [-Werror,-Wimplicit-int-float-conversion] auto tics = uint64_t(idleTimeout.count() * (1 + extraFrac)); ~~~~~~~~~~~~^~~~~~~ ~ ``` This diff fixes the problem by making the existing implicit casts explicit. Reviewed By: Orvid Differential Revision: D22490364 fbshipit-source-id: 90bd116290de1d8906140d514f1d4880c3b3b085
Showing
Please register or sign in to comment