Fixed audiofile warnings (#811)

This commit is contained in:
Denis Kopyrin
2024-07-02 09:53:54 +08:00
committed by GitHub
parent 7381e35db4
commit 500507509b

View File

@@ -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<SignedType, UnsignedType>
struct signedToUnsigned : public std::function<UnsignedType(SignedType)>
{
UnsignedType operator()(SignedType x) { return x - kMinSignedValue; }
};
struct unsignedToSigned : public std::unary_function<SignedType, UnsignedType>
struct unsignedToSigned : public std::function<UnsignedType(SignedType)>
{
SignedType operator()(UnsignedType x) { return x + kMinSignedValue; }
};
@@ -3760,7 +3760,7 @@ private:
};
template <typename Arg, typename Result>
struct intToFloat : public std::unary_function<Arg, Result>
struct intToFloat : public std::function<Result(Arg)>
{
Result operator()(Arg x) const { return x; }
};
@@ -3826,13 +3826,13 @@ private:
};
template <typename Arg, typename Result, unsigned shift>
struct lshift : public std::unary_function<Arg, Result>
struct lshift : public std::function<Result(Arg)>
{
Result operator()(const Arg &x) const { return x << shift; }
};
template <typename Arg, typename Result, unsigned shift>
struct rshift : public std::unary_function<Arg, Result>
struct rshift : public std::function<Result(Arg)>
{
Result operator()(const Arg &x) const { return x >> shift; }
};
@@ -3928,7 +3928,7 @@ private:
};
template <typename Arg, typename Result>
struct floatToFloat : public std::unary_function<Arg, Result>
struct floatToFloat : public std::function<Result(Arg)>
{
Result operator()(Arg x) const { return x; }
};