aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-09-14 10:59:02 -0700
committerChris Robinson <[email protected]>2019-09-14 12:16:51 -0700
commitfa64b1fd6d48165d1e028d1ec96174c3b7fc6341 (patch)
treed1b02d4aa32a742514d0b3610b70decc407de21b /common
parent3675dfcfef3becf8cfe84b0b213d502a2cf0088a (diff)
Fix implicit conversions in the effects
Diffstat (limited to 'common')
-rw-r--r--common/alnumeric.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/common/alnumeric.h b/common/alnumeric.h
index 94ea2ee0..b409ce9c 100644
--- a/common/alnumeric.h
+++ b/common/alnumeric.h
@@ -251,6 +251,8 @@ inline int float2int(float f) noexcept
return static_cast<int>(f);
#endif
}
+inline unsigned int float2uint(float f) noexcept
+{ return static_cast<unsigned int>(float2int(f)); }
/** Converts double-to-int using standard behavior (truncation). */
inline int double2int(double d) noexcept