pcm/PcmFormat: use using instead of typedef

This commit is contained in:
Max Kellermann 2020-02-01 13:38:05 +01:00
parent 4968dd4faa
commit bcc4e97c60

View File

@ -33,8 +33,8 @@
*/ */
template<typename C> template<typename C>
struct PerSampleConvert : C { struct PerSampleConvert : C {
typedef typename C::SrcTraits SrcTraits; using SrcTraits = typename C::SrcTraits;
typedef typename C::DstTraits DstTraits; using DstTraits = typename C::DstTraits;
void Convert(typename DstTraits::pointer gcc_restrict out, void Convert(typename DstTraits::pointer gcc_restrict out,
typename SrcTraits::const_pointer gcc_restrict in, typename SrcTraits::const_pointer gcc_restrict in,
@ -48,8 +48,8 @@ struct Convert8To16
SampleFormat::S16>> {}; SampleFormat::S16>> {};
struct Convert24To16 { struct Convert24To16 {
typedef SampleTraits<SampleFormat::S24_P32> SrcTraits; using SrcTraits = SampleTraits<SampleFormat::S24_P32>;
typedef SampleTraits<SampleFormat::S16> DstTraits; using DstTraits = SampleTraits<SampleFormat::S16>;
PcmDither &dither; PcmDither &dither;
@ -61,8 +61,8 @@ struct Convert24To16 {
}; };
struct Convert32To16 { struct Convert32To16 {
typedef SampleTraits<SampleFormat::S32> SrcTraits; using SrcTraits = SampleTraits<SampleFormat::S32>;
typedef SampleTraits<SampleFormat::S16> DstTraits; using DstTraits = SampleTraits<SampleFormat::S16>;
PcmDither &dither; PcmDither &dither;
@ -88,8 +88,8 @@ struct FloatToInteger : PortableFloatToInteger<F, Traits> {};
template<typename Optimized, typename Portable> template<typename Optimized, typename Portable>
class GlueOptimizedConvert : Optimized, Portable { class GlueOptimizedConvert : Optimized, Portable {
public: public:
typedef typename Portable::SrcTraits SrcTraits; using SrcTraits = typename Portable::SrcTraits;
typedef typename Portable::DstTraits DstTraits; using DstTraits = typename Portable::DstTraits;
void Convert(typename DstTraits::pointer out, void Convert(typename DstTraits::pointer out,
typename SrcTraits::const_pointer in, typename SrcTraits::const_pointer in,