aboutsummaryrefslogtreecommitdiffstats
path: root/core/fmt_traits.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/fmt_traits.h')
-rw-r--r--core/fmt_traits.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/fmt_traits.h b/core/fmt_traits.h
index 1879c81b..02473014 100644
--- a/core/fmt_traits.h
+++ b/core/fmt_traits.h
@@ -31,6 +31,14 @@ struct FmtTypeTraits<FmtShort> {
static constexpr OutT to(const Type val) noexcept { return val*OutT{1.0/32768.0}; }
};
template<>
+struct FmtTypeTraits<FmtInt> {
+ using Type = int32_t;
+
+ template<typename OutT>
+ static constexpr OutT to(const Type val) noexcept
+ { return static_cast<OutT>(val)*OutT{1.0/2147483648.0}; }
+};
+template<>
struct FmtTypeTraits<FmtFloat> {
using Type = float;