-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rsgain: fix the build after legacysupport added
- Loading branch information
1 parent
e84f95b
commit d31a895
Showing
2 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
From b9611ea0679919cbc0ea241eb8b3de2d45a3b007 Mon Sep 17 00:00:00 2001 | ||
From: Sergey Fedorov <[email protected]> | ||
Date: Sat, 7 Dec 2024 06:48:57 +0800 | ||
Subject: [PATCH] rsgain.cpp: use C++ cmath | ||
|
||
--- | ||
src/rsgain.cpp | 4 ++-- | ||
1 file changed, 2 insertions(+), 2 deletions(-) | ||
|
||
diff --git src/rsgain.cpp src/rsgain.cpp | ||
index 54f377f..b30ee6d 100644 | ||
--- src/rsgain.cpp | ||
+++ src/rsgain.cpp | ||
@@ -33,8 +33,8 @@ | ||
#include <stdio.h> | ||
#include <stdlib.h> | ||
#include <string.h> | ||
-#include <math.h> | ||
#include <getopt.h> | ||
+#include <cmath> | ||
#include <string> | ||
#include <locale> | ||
|
||
@@ -150,7 +150,7 @@ bool parse_max_peak_level(const char *value, double &peak) | ||
{ | ||
char *rest = nullptr; | ||
double max_peak = strtod(value, &rest); | ||
- if (rest == value || !isfinite(max_peak)) { | ||
+ if (rest == value || !std::isfinite(max_peak)) { | ||
output_error("Invalid max peak level '{}'", value); | ||
return false; | ||
} |