From 333a08ebf9ceb86d5f9354f96321c4c0f704374e Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 7 Jan 2013 08:53:08 +0100 Subject: replay_gain_info, ...: use cmath instead of math.h in C++ mode Fixes build problems with mingw32. --- src/replay_gain_info.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/replay_gain_info.h') diff --git a/src/replay_gain_info.h b/src/replay_gain_info.h index 53e2451a3..b06dc6cf0 100644 --- a/src/replay_gain_info.h +++ b/src/replay_gain_info.h @@ -22,8 +22,12 @@ #include "check.h" +#ifdef __cplusplus +#include +#else #include #include +#endif enum replay_gain_mode { REPLAY_GAIN_AUTO = -2, @@ -58,7 +62,11 @@ replay_gain_info_init(struct replay_gain_info *info) static inline bool replay_gain_tuple_defined(const struct replay_gain_tuple *tuple) { +#ifdef __cplusplus + return !std::isinf(tuple->gain); +#else return !isinf(tuple->gain); +#endif } #ifdef __cplusplus -- cgit v1.2.3