From 0967d91f44374738c88236e36b26c253a5ea0b09 Mon Sep 17 00:00:00 2001 From: Hannu Haahti Date: Sat, 29 Mar 2014 00:01:56 +0200 Subject: [PATCH] paranoid --- plugins/kicker/fastpow.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/kicker/fastpow.h b/plugins/kicker/fastpow.h index 145388d3f..48fd83c03 100644 --- a/plugins/kicker/fastpow.h +++ b/plugins/kicker/fastpow.h @@ -2,6 +2,8 @@ #ifndef FASTPOW_H #define FASTPOW_H +#include + /* * source: * http://martin.ankerl.com/2007/10/04/optimized-pow-approximation-for-java-and-c-c/ @@ -10,9 +12,9 @@ double fastPow(double a, double b) { union { double d; - int x[2]; + int32_t x[2]; } u = { a }; - u.x[1] = (int)(b * (u.x[1] - 1072632447) + 1072632447); + u.x[1] = (int32_t)(b * (u.x[1] - 1072632447) + 1072632447); u.x[0] = 0; return u.d; }