# HG changeset patch # User reimar # Date 1382273495 0 # Node ID e79bac50b920155127cbc6bcff0acb55001a205a # Parent 12b7f66d1a47bed6fa07a1de7b7fc6b33e199015 Use correct types for constants. Otherwise the compiler might insert a conversion from float to double and back. diff -r 12b7f66d1a47 -r e79bac50b920 libaf/af_format.c --- a/libaf/af_format.c Fri Oct 18 18:03:21 2013 +0000 +++ b/libaf/af_format.c Sun Oct 20 12:51:35 2013 +0000 @@ -491,28 +491,28 @@ switch(bps){ case(1): for(i=0;i= 1.0)//no need to use corrected constant, rounding won't cause overflow + if (f >= 1.0f)//no need to use corrected constant, rounding won't cause overflow ((int32_t*)out)[i] = INT_MAX; else - ((int32_t*)out)[i] = lrintf(f*2147483648.0); + ((int32_t*)out)[i] = lrintf(f*2147483648.0f); } break; @@ -525,19 +525,19 @@ switch(bps){ case(1): for(i=0;i