Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Yushin Cho
aom-rav1e
Commits
f2e44aa6
Commit
f2e44aa6
authored
Aug 07, 2015
by
Alex Converse
Browse files
Move the msvc round() replacement to msvc.h
Change-Id: If470411c3c62a27f52261f4ece2c5054b71789c7
parent
610e258c
Changes
2
Hide whitespace changes
Inline
Side-by-side
vp9/common/vp9_systemdependent.h
View file @
f2e44aa6
...
...
@@ -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)
...
...
vpx_ports/msvc.h
View file @
f2e44aa6
...
...
@@ -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_
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment