From 0c480a3ea724ec07f4989c25fc990a51dfcb1961 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Fri, 24 Jun 2022 13:39:50 -0500 Subject: [PATCH] go to hell and your stupid mess of C++ with Smalltalk language --- extern/nfd-modified/src/nfd_cocoa.mm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/extern/nfd-modified/src/nfd_cocoa.mm b/extern/nfd-modified/src/nfd_cocoa.mm index 929bad8dd..4e0f9e0bf 100644 --- a/extern/nfd-modified/src/nfd_cocoa.mm +++ b/extern/nfd-modified/src/nfd_cocoa.mm @@ -30,7 +30,8 @@ static NSArray *BuildAllowedFileTypes( const std::vector& filterLis // or this: NSString::stringWithUTF8String(typebuf); // buildFilterList->addObject(thisType); // really? did you have to make this mess?! - NSString *thisType = NSString::stringWithUTF8String(typebuf.c_str()); + const char* typebufC=typebuf.c_str(); + NSString *thisType = [NSString stringWithUTF8String:typebufC]; [buildFilterList addObject:thisType]; typebuf=""; } else if (j!='.' && j!='*') { @@ -39,7 +40,8 @@ static NSArray *BuildAllowedFileTypes( const std::vector& filterLis } if (!typebuf.empty()) { // I don't think this will work, but come on... - NSString *thisType = NSString::stringWithUTF8String(typebuf.c_str()); + const char* typebufC=typebuf.c_str(); + NSString *thisType = [NSString stringWithUTF8String:typebufC]; [buildFilterList addObject:thisType]; } }