1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-01-10 22:55:56 +01:00

Fix a clang compiler warning

This commit is contained in:
Paul Licameli
2018-11-12 23:04:00 -05:00
parent 53fcd07b77
commit 6e14dab4f4

View File

@@ -514,22 +514,20 @@ void QuickFixDialog::OnFix(wxCommandEvent &event)
gPrefs->Write( Str, 0); gPrefs->Write( Str, 0);
gPrefs->Flush(); gPrefs->Flush();
AudacityProject & project = *GetActiveProject(); if ( auto pProject = GetActiveProject() ) {
// Sadly SnapTo has to be handled specially, as it is not part of the standard
if( &project == nullptr) // preference dialogs.
(void)0;// Compiler food. if( Str == "/SnapTo" )
// Sadly SnapTo has to be handled specially, as it is not part of the standard {
// preference dialogs. pProject->SetSnapTo( 0 );
else if( Str == "/SnapTo" ) }
{ else
project.SetSnapTo( 0 ); {
} // This is overkill (aka slow), as all preferences are reloaded and all
else // toolbars recreated.
{ // Overkill probably doesn't matter, as this command is infrequently used.
// This is overkill (aka slow), as all preferences are reloaded and all EditActions::DoReloadPreferences( *pProject );
// toolbars recreated. }
// Overkill probably doesn't matter, as this command is infrequently used.
EditActions::DoReloadPreferences( project );
} }
// Change the label after doing the fix, as the fix may take a second or two. // Change the label after doing the fix, as the fix may take a second or two.