aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetteri Aimonen <jpa@github.mail.kapsi.fi>2019-04-15 09:14:33 +0300
committerGitHub <noreply@github.com>2019-04-15 09:14:33 +0300
commit47a5aa74ff33b224b3f9150b0fff8b4a01d177fc (patch)
treef086e20c4ddf7d3048fcd63743de69bf8300fb79
parentbada934981a5961569ad2cb6b9006ed94542cc9c (diff)
parentf13c32228733fbd6d14e0fb8c7c50dc85241353e (diff)
Merge pull request #10 from puzrin/patch-1
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; }