mirror of
https://github.com/fltk/fltk.git
synced 2026-03-23 07:24:03 +08:00
Fixes a couple of compiler warnings on AppleClang.
This commit is contained in:
@@ -255,16 +255,3 @@ if(UNIX)
|
||||
)
|
||||
endforeach()
|
||||
endif(UNIX)
|
||||
|
||||
# Additional warnings during development
|
||||
|
||||
if(APPLE)
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
||||
target_compile_options(fluid-lib PRIVATE
|
||||
-Wall -Wextra -Wpedantic -Werror
|
||||
-Wno-zero-as-null-pointer-constant
|
||||
-Wno-missing-field-initializers
|
||||
-Wno-unused-parameter
|
||||
)
|
||||
endif()
|
||||
endif(APPLE)
|
||||
|
||||
@@ -385,7 +385,7 @@ void Fl_Screen_Driver::rescale_all_windows_from_screen(int screen, float f, floa
|
||||
Fl_Window *win = Fl::first_window();
|
||||
while (win) {
|
||||
if (!win->parent() && (Fl_Window_Driver::driver(win)->screen_num() == screen) &&
|
||||
win->user_data() != &Fl_Screen_Driver::transient_scale_display) {
|
||||
win->user_data() != (void*)&Fl_Screen_Driver::transient_scale_display) {
|
||||
count++;
|
||||
}
|
||||
win = Fl::next_window(win);
|
||||
@@ -396,7 +396,7 @@ void Fl_Screen_Driver::rescale_all_windows_from_screen(int screen, float f, floa
|
||||
win = Fl::first_window(); // memorize all top-level windows
|
||||
while (win) {
|
||||
if (!win->parent() && (Fl_Window_Driver::driver(win)->screen_num() == screen) &&
|
||||
win->user_data() != &Fl_Screen_Driver::transient_scale_display) {
|
||||
win->user_data() != (void*)&Fl_Screen_Driver::transient_scale_display) {
|
||||
win_array[i++] = win;
|
||||
}
|
||||
win = Fl::next_window(win);
|
||||
|
||||
@@ -686,7 +686,7 @@ void Fl_Cocoa_Screen_Driver::breakMacEventLoop()
|
||||
}
|
||||
return self;
|
||||
}
|
||||
- (Fl_Window *)getFl_Window;
|
||||
- (Fl_Window *)getFl_Window
|
||||
{
|
||||
return w;
|
||||
}
|
||||
@@ -1525,13 +1525,13 @@ static FLWindowDelegate *flwindowdelegate_instance = nil;
|
||||
Fl::handle(FL_HIDE, window);
|
||||
fl_unlock_function();
|
||||
}
|
||||
- (void)windowWillEnterFullScreen:(NSNotification *)notif;
|
||||
- (void)windowWillEnterFullScreen:(NSNotification *)notif
|
||||
{
|
||||
FLWindow *nsw = (FLWindow*)[notif object];
|
||||
Fl_Window *window = [nsw getFl_Window];
|
||||
window->_set_fullscreen();
|
||||
}
|
||||
- (void)windowWillExitFullScreen:(NSNotification *)notif;
|
||||
- (void)windowWillExitFullScreen:(NSNotification *)notif
|
||||
{
|
||||
FLWindow *nsw = (FLWindow*)[notif object];
|
||||
Fl_Window *window = [nsw getFl_Window];
|
||||
@@ -3251,7 +3251,7 @@ void Fl_Cocoa_Window_Driver::makeWindow()
|
||||
|
||||
w->set_visible();
|
||||
if ( w->border() || (!w->modal() && !w->tooltip_window() &&
|
||||
w->user_data() != &Fl_Screen_Driver::transient_scale_display) ) Fl::handle(FL_FOCUS, w);
|
||||
w->user_data() != (void*)&Fl_Screen_Driver::transient_scale_display) ) Fl::handle(FL_FOCUS, w);
|
||||
[cw setDelegate:[FLWindowDelegate singleInstance]];
|
||||
if (show_iconic()) {
|
||||
show_iconic(0);
|
||||
@@ -4747,7 +4747,7 @@ static CGImageRef capture_decorated_window_SCK(NSWindow *nswin) {
|
||||
}
|
||||
win = Fl::next_window(win);
|
||||
}
|
||||
CGWindowID target_id = [nswin windowNumber];
|
||||
CGWindowID target_id = (CGWindowID)[nswin windowNumber];
|
||||
NSRect r = [nswin frame];
|
||||
int W = r.size.width, H = r.size.height;
|
||||
[SCShareableContent getCurrentProcessShareableContentWithCompletionHandler: // macOS 14.4
|
||||
@@ -4791,7 +4791,7 @@ static CGImageRef capture_decorated_window_SCK(NSWindow *nswin) {
|
||||
while (!capture_err && !capture) CFRunLoopRun();
|
||||
if (capture_err) return NULL;
|
||||
// ScreenCaptureKit bug cont'd: restore modified styleMasks.
|
||||
for (int i = 0, count = [xid_array count]; i < count; i++) {
|
||||
for (int i = 0, count = (int)[xid_array count]; i < count; i++) {
|
||||
NSUInteger mask;
|
||||
[(NSData*)[mask_array objectAtIndex:i] getBytes:&mask length:sizeof(NSUInteger)];
|
||||
NSWindow *xid = (NSWindow*)[xid_array objectAtIndex:i];
|
||||
|
||||
Reference in New Issue
Block a user