aboutsummaryrefslogtreecommitdiff
path: root/src/replay_gain_info.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-01-07 08:53:08 +0100
committerMax Kellermann <max@duempel.org>2013-01-07 10:19:02 +0100
commit333a08ebf9ceb86d5f9354f96321c4c0f704374e (patch)
tree2da12e51442fe0a912f5811c0ed21a59dbfa9967 /src/replay_gain_info.h
parent989c9a7317354a538aef7c3ed35cf995a9afc6e1 (diff)
replay_gain_info, ...: use cmath instead of math.h in C++ mode
Fixes build problems with mingw32.
Diffstat (limited to 'src/replay_gain_info.h')
-rw-r--r--src/replay_gain_info.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/replay_gain_info.h b/src/replay_gain_info.h
index 53e2451a..b06dc6cf 100644
--- a/src/replay_gain_info.h
+++ b/src/replay_gain_info.h
@@ -22,8 +22,12 @@
#include "check.h"
+#ifdef __cplusplus
+#include <cmath>
+#else
#include <stdbool.h>
#include <math.h>
+#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