aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVitaly Puzrin <vitaly@rcdesign.ru>2019-04-15 02:29:08 +0300
committerGitHub <noreply@github.com>2019-04-15 02:29:08 +0300
commitf13c32228733fbd6d14e0fb8c7c50dc85241353e (patch)
treef086e20c4ddf7d3048fcd63743de69bf8300fb79
parentbada934981a5961569ad2cb6b9006ed94542cc9c (diff)
Suppress `-Wconversion` warning
-rw-r--r--libfixmath/fix16.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libfixmath/fix16.hpp b/libfixmath/fix16.hpp
index 4fcfaf3..dc8a5b7 100644
--- a/libfixmath/fix16.hpp
+++ b/libfixmath/fix16.hpp
@@ -17,7 +17,7 @@ class Fix16 {
operator fix16_t() const { return value; }
operator double() const { return fix16_to_dbl(value); }
operator float() const { return fix16_to_float(value); }
- operator int16_t() const { return fix16_to_int(value); }
+ operator int16_t() const { return (int16_t)fix16_to_int(value); }
Fix16 & operator=(const Fix16 &rhs) { value = rhs.value; return *this; }
Fix16 & operator=(const fix16_t rhs) { value = rhs; return *this; }