diff options
author | Chris Robinson <[email protected]> | 2023-12-26 00:02:23 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-12-26 02:21:35 -0800 |
commit | 1fddc044ac765d00e64628e59edcbcd71f0046b1 (patch) | |
tree | 9e6734e0527bd418a4775c7d41c3b6a25ca4eb41 /al/effects | |
parent | 095d1964feacaa4ec253db028fb1e8c04f718511 (diff) |
Clean up some gotos and non-optimal casts
Diffstat (limited to 'al/effects')
-rw-r--r-- | al/effects/chorus.cpp | 4 | ||||
-rw-r--r-- | al/effects/fshifter.cpp | 4 | ||||
-rw-r--r-- | al/effects/modulator.cpp | 2 | ||||
-rw-r--r-- | al/effects/vmorpher.cpp | 6 |
4 files changed, 8 insertions, 8 deletions
diff --git a/al/effects/chorus.cpp b/al/effects/chorus.cpp index dba59d1d..913d1215 100644 --- a/al/effects/chorus.cpp +++ b/al/effects/chorus.cpp @@ -49,7 +49,7 @@ inline ALenum EnumFromWaveform(ChorusWaveform type) EffectProps genDefaultChorusProps() noexcept { ChorusProps props{}; - props.Waveform = *WaveformFromEnum(AL_CHORUS_DEFAULT_WAVEFORM); + props.Waveform = WaveformFromEnum(AL_CHORUS_DEFAULT_WAVEFORM).value(); props.Phase = AL_CHORUS_DEFAULT_PHASE; props.Rate = AL_CHORUS_DEFAULT_RATE; props.Depth = AL_CHORUS_DEFAULT_DEPTH; @@ -61,7 +61,7 @@ EffectProps genDefaultChorusProps() noexcept EffectProps genDefaultFlangerProps() noexcept { FlangerProps props{}; - props.Waveform = *WaveformFromEnum(AL_FLANGER_DEFAULT_WAVEFORM); + props.Waveform = WaveformFromEnum(AL_FLANGER_DEFAULT_WAVEFORM).value(); props.Phase = AL_FLANGER_DEFAULT_PHASE; props.Rate = AL_FLANGER_DEFAULT_RATE; props.Depth = AL_FLANGER_DEFAULT_DEPTH; diff --git a/al/effects/fshifter.cpp b/al/effects/fshifter.cpp index 6f19e0dd..556244ac 100644 --- a/al/effects/fshifter.cpp +++ b/al/effects/fshifter.cpp @@ -45,8 +45,8 @@ EffectProps genDefaultProps() noexcept { FshifterProps props{}; props.Frequency = AL_FREQUENCY_SHIFTER_DEFAULT_FREQUENCY; - props.LeftDirection = *DirectionFromEmum(AL_FREQUENCY_SHIFTER_DEFAULT_LEFT_DIRECTION); - props.RightDirection = *DirectionFromEmum(AL_FREQUENCY_SHIFTER_DEFAULT_RIGHT_DIRECTION); + props.LeftDirection = DirectionFromEmum(AL_FREQUENCY_SHIFTER_DEFAULT_LEFT_DIRECTION).value(); + props.RightDirection = DirectionFromEmum(AL_FREQUENCY_SHIFTER_DEFAULT_RIGHT_DIRECTION).value(); return props; } diff --git a/al/effects/modulator.cpp b/al/effects/modulator.cpp index 566b333e..7e9424c0 100644 --- a/al/effects/modulator.cpp +++ b/al/effects/modulator.cpp @@ -47,7 +47,7 @@ EffectProps genDefaultProps() noexcept ModulatorProps props{}; props.Frequency = AL_RING_MODULATOR_DEFAULT_FREQUENCY; props.HighPassCutoff = AL_RING_MODULATOR_DEFAULT_HIGHPASS_CUTOFF; - props.Waveform = *WaveformFromEmum(AL_RING_MODULATOR_DEFAULT_WAVEFORM); + props.Waveform = WaveformFromEmum(AL_RING_MODULATOR_DEFAULT_WAVEFORM).value(); return props; } diff --git a/al/effects/vmorpher.cpp b/al/effects/vmorpher.cpp index a986ddf7..35a64d32 100644 --- a/al/effects/vmorpher.cpp +++ b/al/effects/vmorpher.cpp @@ -126,11 +126,11 @@ EffectProps genDefaultProps() noexcept { VmorpherProps props{}; props.Rate = AL_VOCAL_MORPHER_DEFAULT_RATE; - props.PhonemeA = *PhenomeFromEnum(AL_VOCAL_MORPHER_DEFAULT_PHONEMEA); - props.PhonemeB = *PhenomeFromEnum(AL_VOCAL_MORPHER_DEFAULT_PHONEMEB); + props.PhonemeA = PhenomeFromEnum(AL_VOCAL_MORPHER_DEFAULT_PHONEMEA).value(); + props.PhonemeB = PhenomeFromEnum(AL_VOCAL_MORPHER_DEFAULT_PHONEMEB).value(); props.PhonemeACoarseTuning = AL_VOCAL_MORPHER_DEFAULT_PHONEMEA_COARSE_TUNING; props.PhonemeBCoarseTuning = AL_VOCAL_MORPHER_DEFAULT_PHONEMEB_COARSE_TUNING; - props.Waveform = *WaveformFromEmum(AL_VOCAL_MORPHER_DEFAULT_WAVEFORM); + props.Waveform = WaveformFromEmum(AL_VOCAL_MORPHER_DEFAULT_WAVEFORM).value(); return props; } |