X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?p=o-du%2Fphy.git;a=blobdiff_plain;f=fhi_lib%2Ftest%2Fcommon%2Fjson.hpp;fp=fhi_lib%2Ftest%2Fcommon%2Fjson.hpp;h=321e4bab59c7e764d0a22c0fe98b02da16f7aeee;hp=ac24e66f7fbb18418ec57ea837e7b32eeef81357;hb=892daba4c616407f16506415d5a69549519ef11d;hpb=76b4495d593ccf45d712db1a3ec96fa9d2d8f5f5 diff --git a/fhi_lib/test/common/json.hpp b/fhi_lib/test/common/json.hpp index ac24e66..321e4ba 100644 --- a/fhi_lib/test/common/json.hpp +++ b/fhi_lib/test/common/json.hpp @@ -7840,9 +7840,9 @@ class basic_json // include at least decoding support for them even without such // support. An example of a small decoder for half-precision // floating-point numbers in the C language is shown in Fig. 3. - const int half = (v.at(current_idx + 1) << 8) + v.at(current_idx + 2); - const int exp = (half >> 10) & 0x1f; - const int mant = half & 0x3ff; + const int int16_t = (v.at(current_idx + 1) << 8) + v.at(current_idx + 2); + const int exp = (int16_t >> 10) & 0x1f; + const int mant = int16_t & 0x3ff; double val; if (exp == 0) { @@ -7858,7 +7858,7 @@ class basic_json ? std::numeric_limits::infinity() : std::numeric_limits::quiet_NaN(); } - return (half & 0x8000) != 0 ? -val : val; + return (int16_t & 0x8000) != 0 ? -val : val; } case 0xfa: // Single-Precision Float (four-byte IEEE 754)