Skip to content

Commit 11b085c

Browse files
authored
Merge pull request scp-fs2open#6714 from Goober5000/goto_considered_useful
goto considered useful
2 parents aabc0df + 3d68bf2 commit 11b085c

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

code/sound/ds.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ int ds_get_free_channel_retail(float new_volume, int snd_id, int priority)
772772
continue;
773773
}
774774

775-
OpenAL_ErrorCheck( alGetSourcei(chp->source_id, AL_SOURCE_STATE, &status), continue );
775+
OpenAL_ErrorCheck( alGetSourcei(chp->source_id, AL_SOURCE_STATE, &status), goto continue_channels );
776776

777777
if ( (status == AL_INITIAL) || (status == AL_STOPPED) ) {
778778
ds_close_channel_fast(i);
@@ -795,6 +795,7 @@ int ds_get_free_channel_retail(float new_volume, int snd_id, int priority)
795795
lowest_vol = chp->vol;
796796
}
797797
}
798+
continue_channels: ;
798799
}
799800

800801
// If we've exceeded the limit, then maybe stop the duplicate if it is lower volume
@@ -885,7 +886,7 @@ int ds_get_free_channel_enhanced(float new_volume, int snd_id, int enhanced_prio
885886
continue;
886887
}
887888

888-
OpenAL_ErrorCheck( alGetSourcei(chp->source_id, AL_SOURCE_STATE, &status), continue );
889+
OpenAL_ErrorCheck( alGetSourcei(chp->source_id, AL_SOURCE_STATE, &status), goto continue_channels );
889890

890891
if ( (status == AL_INITIAL) || (status == AL_STOPPED) ) {
891892
ds_close_channel_fast(i);
@@ -924,6 +925,7 @@ int ds_get_free_channel_enhanced(float new_volume, int snd_id, int enhanced_prio
924925
least_important_priority = chp->priority;
925926
}
926927
}
928+
continue_channels: ;
927929
}
928930

929931
// If we've exceeded the limit, then stop the least important duplicate if it is lower or equal volume

0 commit comments

Comments
 (0)