From 877fa25d5b07044edd1dc20eb9054f1fe4f18a5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Tue, 3 Feb 2015 22:24:40 -0800 Subject: [PATCH] cleanup. --- examples/common/entry/entry_osx.mm | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/examples/common/entry/entry_osx.mm b/examples/common/entry/entry_osx.mm index 0f556675d..eec2e513c 100644 --- a/examples/common/entry/entry_osx.mm +++ b/examples/common/entry/entry_osx.mm @@ -57,21 +57,21 @@ namespace entry static int32_t threadFunc(void* _userData) { - CFBundleRef mainBundle = CFBundleGetMainBundle(); - if ( mainBundle != nil ) - { - CFURLRef resourcesURL = CFBundleCopyResourcesDirectoryURL(mainBundle); - if ( resourcesURL != nil ) - { - char path[PATH_MAX]; - if (CFURLGetFileSystemRepresentation(resourcesURL, TRUE, (UInt8 *)path, PATH_MAX) ) - { - chdir(path); - } - CFRelease(resourcesURL); - } - } - + CFBundleRef mainBundle = CFBundleGetMainBundle(); + if ( mainBundle != nil ) + { + CFURLRef resourcesURL = CFBundleCopyResourcesDirectoryURL(mainBundle); + if ( resourcesURL != nil ) + { + char path[PATH_MAX]; + if (CFURLGetFileSystemRepresentation(resourcesURL, TRUE, (UInt8 *)path, PATH_MAX) ) + { + chdir(path); + } + CFRelease(resourcesURL); + } + } + MainThreadEntry* self = (MainThreadEntry*)_userData; return main(self->m_argc, self->m_argv); }