Commit f2e44aa6 authored by Alex Converse's avatar Alex Converse

Move the msvc round() replacement to msvc.h

Change-Id: If470411c3c62a27f52261f4ece2c5054b71789c7
parent 610e258c
......@@ -33,16 +33,6 @@ void vpx_reset_mmx_state(void);
#define vp9_clear_system_state()
#endif
#if defined(_MSC_VER) && _MSC_VER < 1800
// round is not defined in MSVC before VS2013.
static INLINE double round(double x) {
if (x < 0)
return ceil(x - 0.5);
else
return floor(x + 0.5);
}
#endif
// use GNU builtins where available.
#if defined(__GNUC__) && \
((__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || __GNUC__ >= 4)
......
......@@ -18,5 +18,14 @@
# define snprintf _snprintf
# endif // _MSC_VER < 1900
#if _MSC_VER < 1800 // VS2013 provides round
static INLINE double round(double x) {
if (x < 0)
return ceil(x - 0.5);
else
return floor(x + 0.5);
}
#endif // _MSC_VER < 1800
#endif // _MSC_VER
#endif // VPX_PORTS_MSVC_H_
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment