Last active
January 29, 2016 05:16
-
-
Save kkabdol/4e67234714376ef33a67 to your computer and use it in GitHub Desktop.
Returning a reference to a function-local static variable
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int32& FIOSAudioDevice::GetSuspendCounter() | |
{ | |
static int32 SuspendCounter = 0; | |
return SuspendCounter; | |
} | |
void FIOSAudioDevice::ResumeContext() | |
{ | |
int32& SuspendCounter = GetSuspendCounter(); | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
UE4\Engine\Source\Runtime\IOS\IOSAudio\Private\IOSAudioDevice.cpp