summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMohammed Alyousef <may642_2000@hotmail.com>2025-04-06 01:05:39 +0300
committerGitHub <noreply@github.com>2025-04-05 15:05:39 -0700
commit8b8d92a313f97d5e0e2290ec880758d8606e83c3 (patch)
treef720e87f78cd57fd073be2e93bedbfd3a4afc5c1 /src
parent70a104131a8d1f24e3d1aff0eb25d9859d85e2ec (diff)
Fixes error: two consecutive '[' tokens on g++ with objcpp files (#1246)
Applying MoAlyousef's PR. -erco
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Native_File_Chooser_MAC.mm2
-rw-r--r--src/Fl_cocoa.mm2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/Fl_Native_File_Chooser_MAC.mm b/src/Fl_Native_File_Chooser_MAC.mm
index 002e0a404..77cf16585 100644
--- a/src/Fl_Native_File_Chooser_MAC.mm
+++ b/src/Fl_Native_File_Chooser_MAC.mm
@@ -498,7 +498,7 @@ static char *prepareMacFilter(int count, const char *filter, char **patterns) {
BOOL isdir = NO;
[[NSFileManager defaultManager] fileExistsAtPath:filename isDirectory:&isdir];
if (isdir) return YES;
- if ( fl_filename_match([filename fileSystemRepresentation], filter_pattern[ [nspopup indexOfSelectedItem] ]) ) return YES;
+ if ( fl_filename_match([filename fileSystemRepresentation], filter_pattern[([nspopup indexOfSelectedItem])]) ) return YES;
return NO;
}
- (BOOL)panel:(id)sender shouldEnableURL:(NSURL *)url
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm
index 1e3e68637..2b8ebd7aa 100644
--- a/src/Fl_cocoa.mm
+++ b/src/Fl_cocoa.mm
@@ -2758,7 +2758,7 @@ static FLTextInputContext* fltextinputcontext_instance = nil;
NSData *data = [pboard dataForType:UTF8_pasteboard_type];
DragData = (char *)malloc([data length] + 1);
[data getBytes:DragData length:[data length]];
- DragData[[data length]] = 0;
+ DragData[([data length])] = 0;
Fl_Screen_Driver::convert_crlf(DragData, strlen(DragData));
}
else {