From 500507509ba0ae8b49afd39286e8fb650b797e96 Mon Sep 17 00:00:00 2001 From: Denis Kopyrin Date: Tue, 2 Jul 2024 09:53:54 +0800 Subject: [PATCH] Fixed audiofile warnings (#811) --- tools/audiofile/audiofile.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/audiofile/audiofile.cpp b/tools/audiofile/audiofile.cpp index 459bc33e..bfb67899 100644 --- a/tools/audiofile/audiofile.cpp +++ b/tools/audiofile/audiofile.cpp @@ -3562,12 +3562,12 @@ struct signConverter static const int kMaxSignedValue = (((1 << (kScaleBits - 1)) - 1) << 1) + 1; static const int kMinSignedValue = -kMaxSignedValue - 1; - struct signedToUnsigned : public std::unary_function + struct signedToUnsigned : public std::function { UnsignedType operator()(SignedType x) { return x - kMinSignedValue; } }; - struct unsignedToSigned : public std::unary_function + struct unsignedToSigned : public std::function { SignedType operator()(UnsignedType x) { return x + kMinSignedValue; } }; @@ -3760,7 +3760,7 @@ private: }; template -struct intToFloat : public std::unary_function +struct intToFloat : public std::function { Result operator()(Arg x) const { return x; } }; @@ -3826,13 +3826,13 @@ private: }; template -struct lshift : public std::unary_function +struct lshift : public std::function { Result operator()(const Arg &x) const { return x << shift; } }; template -struct rshift : public std::unary_function +struct rshift : public std::function { Result operator()(const Arg &x) const { return x >> shift; } }; @@ -3928,7 +3928,7 @@ private: }; template -struct floatToFloat : public std::unary_function +struct floatToFloat : public std::function { Result operator()(Arg x) const { return x; } };