From 21b8571f50d8d9959282b652eea45759e98ede55 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 16 Jun 2019 22:45:07 -0700 Subject: Avoid an implied else if check --- Alc/converter.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'Alc') diff --git a/Alc/converter.cpp b/Alc/converter.cpp index a6a5f2c4..a36d05ad 100644 --- a/Alc/converter.cpp +++ b/Alc/converter.cpp @@ -333,12 +333,6 @@ ChannelConverterPtr CreateChannelConverter(DevFmtType srcType, DevFmtChannels sr void ChannelConverter::convert(const ALvoid *src, ALfloat *dst, ALsizei frames) const { - if(mSrcChans == mDstChans) - { - LoadSamples(dst, src, 1u, mSrcType, frames*ChannelsFromDevFmt(mSrcChans, 0)); - return; - } - if(mSrcChans == DevFmtStereo && mDstChans == DevFmtMono) { switch(mSrcType) @@ -354,7 +348,7 @@ void ChannelConverter::convert(const ALvoid *src, ALfloat *dst, ALsizei frames) #undef HANDLE_FMT } } - else /*if(mSrcChans == DevFmtMono && mDstChans == DevFmtStereo)*/ + else if(mSrcChans == DevFmtMono && mDstChans == DevFmtStereo) { switch(mSrcType) { @@ -369,4 +363,6 @@ void ChannelConverter::convert(const ALvoid *src, ALfloat *dst, ALsizei frames) #undef HANDLE_FMT } } + else + LoadSamples(dst, src, 1u, mSrcType, frames*ChannelsFromDevFmt(mSrcChans, 0)); } -- cgit v1.2.3