diff options
author | Chris Robinson <[email protected]> | 2018-12-01 11:28:11 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-12-01 11:28:11 -0800 |
commit | 255c07def9814b1c07196983a0a670dccccc0d50 (patch) | |
tree | 7dabcb65650b65528dd73c3d9f25e6faabf123bd /Alc/converter.cpp | |
parent | cc161fe7c12182ebca3a49a380c4c60ebb1afb5f (diff) |
Try to pacify MSVC's missing a suitable default constructor
Diffstat (limited to 'Alc/converter.cpp')
-rw-r--r-- | Alc/converter.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/Alc/converter.cpp b/Alc/converter.cpp index 958936a1..3effddd8 100644 --- a/Alc/converter.cpp +++ b/Alc/converter.cpp @@ -341,18 +341,13 @@ ALsizei SampleConverterInput(SampleConverter *converter, const ALvoid **src, ALs } -ChannelConverter *CreateChannelConverter(enum DevFmtType srcType, enum DevFmtChannels srcChans, enum DevFmtChannels dstChans) +ChannelConverter *CreateChannelConverter(DevFmtType srcType, DevFmtChannels srcChans, DevFmtChannels dstChans) { if(srcChans != dstChans && !((srcChans == DevFmtMono && dstChans == DevFmtStereo) || (srcChans == DevFmtStereo && dstChans == DevFmtMono))) return nullptr; - auto converter = new (al_calloc(DEF_ALIGN, sizeof(ChannelConverter))) ChannelConverter{}; - converter->mSrcType = srcType; - converter->mSrcChans = srcChans; - converter->mDstChans = dstChans; - - return converter; + return new ChannelConverter{srcType, srcChans, dstChans}; } void DestroyChannelConverter(ChannelConverter **converter) |