Well, that solves the problem of 'constexpr' IF.

This is not supported in C++14, and this is the maximum we can use for now.
This commit is contained in:
Stephen Anthony 2018-08-19 20:23:43 -02:30
parent 24cd6cb219
commit 6d5278fe0c
2 changed files with 3 additions and 3 deletions

View File

@ -334,7 +334,7 @@ void AtariNTSC::init(init_t& impl, const Setup& setup)
initFilters(impl, setup);
/* generate gamma table */
if constexpr( gamma_size > 1 )
if ( gamma_size > 1 )
{
float const to_float = 1.0f / (gamma_size - (gamma_size > 1));
float const gamma = 1.1333f - float(setup.gamma) * 0.5f;
@ -369,7 +369,7 @@ void AtariNTSC::init(init_t& impl, const Setup& setup)
*out++ = i * s + q * c;
}
while ( --n2 );
if constexpr( burst_count > 1 )
if ( burst_count > 1 )
ROTATE_IQ( s, c, 0.866025f, -0.5f ); /* +120 degrees */
}
while ( --n );

View File

@ -227,7 +227,7 @@ void AudioDialog::setDefaults()
mySoundEnableCheckbox->setState(AudioSettings::DEFAULT_ENABLED);
myModePopup->setSelected(static_cast<int>(AudioSettings::DEFAULT_PRESET));
if constexpr(AudioSettings::DEFAULT_PRESET == AudioSettings::Preset::custom) {
if (AudioSettings::DEFAULT_PRESET == AudioSettings::Preset::custom) {
myFragsizePopup->setSelected(AudioSettings::DEFAULT_FRAGMENT_SIZE);
myFreqPopup->setSelected(AudioSettings::DEFAULT_SAMPLE_RATE);
myHeadroomSlider->setValue(AudioSettings::DEFAULT_HEADROOM);