aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/converter.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-12-01 11:28:11 -0800
committerChris Robinson <[email protected]>2018-12-01 11:28:11 -0800
commit255c07def9814b1c07196983a0a670dccccc0d50 (patch)
tree7dabcb65650b65528dd73c3d9f25e6faabf123bd /Alc/converter.cpp
parentcc161fe7c12182ebca3a49a380c4c60ebb1afb5f (diff)
Try to pacify MSVC's missing a suitable default constructor
Diffstat (limited to 'Alc/converter.cpp')
-rw-r--r--Alc/converter.cpp9
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)