diff options
author | soggysec <sagui.gvsu@gmail.com> | 2018-05-27 09:40:11 -0700 |
---|---|---|
committer | Marcus Müller <marcus@hostalia.de> | 2018-05-31 09:29:56 +0200 |
commit | 34f7e66e82079ef25b72ba6d6931fac05cfb968a (patch) | |
tree | ad51790e527769803f1368fd8963cb2a80390b9e /gr-blocks/lib/float_array_to_int.cc | |
parent | cdc8a4087559f872c6d07fc0ce0d16a7100aafaa (diff) |
Removed hardcoded value
Replaced hardcoded MAX/MIN values with the ones defined in cstdint.
Diffstat (limited to 'gr-blocks/lib/float_array_to_int.cc')
-rw-r--r-- | gr-blocks/lib/float_array_to_int.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gr-blocks/lib/float_array_to_int.cc b/gr-blocks/lib/float_array_to_int.cc index 49d3cdca7a..4fee3211e2 100644 --- a/gr-blocks/lib/float_array_to_int.cc +++ b/gr-blocks/lib/float_array_to_int.cc @@ -27,10 +27,10 @@ #define _ISOC9X_SOURCE #include <float_array_to_int.h> #include <math.h> -#include <stdint.h> +#include <cstdint> -static const int64_t MAX_INT = 2147483647; // (2^31)-1 -static const int64_t MIN_INT = -2147483648; // -(2^31) +static const int64_t MAX_INT = INT32_MAX; +static const int64_t MIN_INT = INT32_MIN; void float_array_to_int(const float *in, int *out, float scale, int nsamples) |