Avoid implicit conversion from float to double. (#7003)
authorAdvait Jain <advaitjain@users.noreply.github.com>
Fri, 24 Dec 2021 02:31:30 +0000 (18:31 -0800)
committerGitHub <noreply@github.com>
Fri, 24 Dec 2021 02:31:30 +0000 (20:31 -0600)
commitf28c2b29364970e23c8ba3d751ca188f8a08c71e
treef2b8d62b3dc3670d829c22ff7a1f135af4c42731
parent96f3cf690feec0739e57c183b698779ab4d7d0c0
Avoid implicit conversion from float to double. (#7003)

https://github.com/tensorflow/tflite-micro makes use of flatbuffers with
a variety of DSP toolchains.

Without the change from this PR, we can get a double-promotion warning
with some of these DSP toolchains:
```
flatbuffers/include/flatbuffers/util.h:104:11: error: implicit conversion increases floating-point precision: 'std::numeric_limits<float>::_Ty' (aka 'float') to 'double' [-Werror,-Wdouble-promotion]
  T eps = std::numeric_limits<float>::epsilon();
    ~~~   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
include/flatbuffers/util.h