From 37f97729c6a772743e3092e213ea0f29754a7cbc Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 18 Jul 2015 00:32:15 +0200 Subject: [PATCH] No real changes, just get rid of a variable in wxOSX wxSound code. Don't define a variable which is used exactly once, testing for the async flag directly is just as, or even more, readable and shorter. (this is a backport of 605149ed07a377d471845c6d7f0a81191d29ce99 from master) --- src/osx/core/sound.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/osx/core/sound.cpp b/src/osx/core/sound.cpp index 327de35cde..d96ca0f9a3 100644 --- a/src/osx/core/sound.cpp +++ b/src/osx/core/sound.cpp @@ -108,13 +108,11 @@ bool wxOSXAudioToolboxSoundData::Play(unsigned flags) AudioServicesAddSystemSoundCompletion( m_soundID, CFRunLoopGetCurrent(), NULL, wxOSXAudioToolboxSoundData::CompletionCallback, (void *) this ); - bool sync = !(flags & wxSOUND_ASYNC); - m_playing = true; AudioServicesPlaySystemSound(m_soundID); - if ( sync ) + if ( !(flags & wxSOUND_ASYNC) ) { while ( m_playing ) {