From f13c32228733fbd6d14e0fb8c7c50dc85241353e Mon Sep 17 00:00:00 2001 From: Vitaly Puzrin Date: Mon, 15 Apr 2019 02:29:08 +0300 Subject: [PATCH] Suppress `-Wconversion` warning --- libfixmath/fix16.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }