mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-22 20:45:11 +00:00
can you do the inverse
This commit is contained in:
parent
3366099dbe
commit
1ffca9bea2
1 changed files with 3 additions and 3 deletions
6
extern/nfd-modified/src/nfd_cocoa.mm
vendored
6
extern/nfd-modified/src/nfd_cocoa.mm
vendored
|
@ -22,7 +22,7 @@ static NSArray *BuildAllowedFileTypes( const std::vector<std::string>& filterLis
|
|||
// NSMutableArray *buildFilterList = NSMutableArray::alloc()->init();
|
||||
NSMutableArray *buildFilterList = [[NSMutableArray alloc] init];
|
||||
|
||||
String typebuf;
|
||||
std::string typebuf;
|
||||
for (std::string& i: filterList) {
|
||||
typebuf="";
|
||||
for (char& j: i) {
|
||||
|
@ -30,7 +30,7 @@ static NSArray *BuildAllowedFileTypes( const std::vector<std::string>& filterLis
|
|||
// or this: NSString::stringWithUTF8String(typebuf);
|
||||
// buildFilterList->addObject(thisType);
|
||||
// really? did you have to make this mess?!
|
||||
NSString *thisType = [NSString stringWithUTF8String: [typebuf c_str]];
|
||||
NSString *thisType = NSString::stringWithUTF8String(typebuf.c_str());
|
||||
[buildFilterList addObject:thisType];
|
||||
typebuf="";
|
||||
} else if (j!='.' && j!='*') {
|
||||
|
@ -39,7 +39,7 @@ static NSArray *BuildAllowedFileTypes( const std::vector<std::string>& filterLis
|
|||
}
|
||||
if (!typebuf.empty()) {
|
||||
// I don't think this will work, but come on...
|
||||
NSString *thisType = [NSString stringWithUTF8String: [typebuf c_str]];
|
||||
NSString *thisType = NSString::stringWithUTF8String(typebuf.c_str());
|
||||
[buildFilterList addObject:thisType];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue