silences some 68 compiler errors

because vc++ does not get that the static structure is used only in
one of those switch-branches :/
This commit is contained in:
Jörg Hinrichs 2006-10-10 20:00:03 +00:00
parent 4069a6811a
commit c3fd8ca698

View file

@ -520,25 +520,27 @@ void execute_command(display& disp, HOTKEY_COMMAND command, command_executor* ex
preferences::set_turbo(!preferences::turbo());
break;
case HOTKEY_MUTE:
// look if both is not playing
static struct before_muted_s
{
bool playing_sound,playing_music;
before_muted_s() : playing_sound(false),playing_music(false){}
} before_muted;
if (preferences::music_on() || preferences::sound_on())
{
//then remember settings and mute both
before_muted.playing_sound = preferences::sound_on();
before_muted.playing_music = preferences::music_on();
preferences::set_sound(false);
preferences::set_music(false);
}
else
{
//then set setings before mute
preferences::set_sound(before_muted.playing_sound);
preferences::set_music(before_muted.playing_music);
// look if both is not playing
static struct before_muted_s
{
bool playing_sound,playing_music;
before_muted_s() : playing_sound(false),playing_music(false){}
} before_muted;
if (preferences::music_on() || preferences::sound_on())
{
//then remember settings and mute both
before_muted.playing_sound = preferences::sound_on();
before_muted.playing_music = preferences::music_on();
preferences::set_sound(false);
preferences::set_music(false);
}
else
{
//then set setings before mute
preferences::set_sound(before_muted.playing_sound);
preferences::set_music(before_muted.playing_music);
}
}
break;
case HOTKEY_CYCLE_UNITS: