diff options
Diffstat (limited to 'src/uscxml/URL.mm')
-rw-r--r-- | src/uscxml/URL.mm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/uscxml/URL.mm b/src/uscxml/URL.mm index 3344601..e6dc9c5 100644 --- a/src/uscxml/URL.mm +++ b/src/uscxml/URL.mm @@ -10,19 +10,21 @@ namespace uscxml { std::string URL::getResourceDir() { + std::string path; #if HAS_AUTORELEASE_POOL @autoreleasepool { #else NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; #endif NSString *resourcePath = [[NSBundle mainBundle] resourcePath]; - return std::string([resourcePath cStringUsingEncoding:NSUTF8StringEncoding]); + path = [resourcePath cStringUsingEncoding:NSUTF8StringEncoding]; #if HAS_AUTORELEASE_POOL } #else [pool drain]; #endif + return path; } } |