summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnuradio-core/src/lib/general/gri_float_to_int.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/gnuradio-core/src/lib/general/gri_float_to_int.cc b/gnuradio-core/src/lib/general/gri_float_to_int.cc
index 0b29abfd9..8a05da7b4 100644
--- a/gnuradio-core/src/lib/general/gri_float_to_int.cc
+++ b/gnuradio-core/src/lib/general/gri_float_to_int.cc
@@ -28,15 +28,15 @@
#include <gri_float_to_int.h>
#include <math.h>
-static const int MIN_INT = -2147483648; // -2^31
-static const int MAX_INT = 2147483647; // (2^31)-1
+static const long int MAX_INT = 2147483647; // (2^31)-1
+static const long int MIN_INT = -2147483648; // -2^31
void
gri_float_to_int (const float *in, int *out, int nsamples)
{
for (int i = 0; i < nsamples; i++){
- long int r = (long int) rint (in[i]);
+ long int r = static_cast<long int>(rint(in[i]));
if (r < MIN_INT)
r = MIN_INT;
else if (r > MAX_INT)