From fb5e2f56109e825ce3c446f80e075ee3dde81c3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Fri, 4 Sep 2020 16:23:00 +0200 Subject: Cleanup: Clang-Tidy bugprone-incorrect-roundings fixes Should cause no noticeable difference. --- source/blender/ikplugin/intern/itasc_plugin.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/ikplugin') diff --git a/source/blender/ikplugin/intern/itasc_plugin.cpp b/source/blender/ikplugin/intern/itasc_plugin.cpp index a5fdb9ef491..0bc73d4812b 100644 --- a/source/blender/ikplugin/intern/itasc_plugin.cpp +++ b/source/blender/ikplugin/intern/itasc_plugin.cpp @@ -22,6 +22,7 @@ * \ingroup ikplugin */ +#include #include #include #include @@ -1765,7 +1766,7 @@ static void execute_scene(struct Depsgraph *depsgraph, if (ikscene->cache && !reiterate && simulation) { iTaSC::CacheTS sts, cts; - sts = cts = (iTaSC::CacheTS)(timestamp * 1000.0 + 0.5); + sts = cts = (iTaSC::CacheTS)std::round(timestamp * 1000.0); if (ikscene->cache->getPreviousCacheItem(ikscene->armature, 0, &cts) == NULL || cts == 0) { // the cache is empty before this time, reiterate if (ikparam->flag & ITASC_INITIAL_REITERATION) { -- cgit v1.2.3