gl/cocoa: fix compiler warning
authorJulien Isorce <julien.isorce@gmail.com>
Mon, 3 Nov 2014 22:59:41 +0000 (22:59 +0000)
committerTim-Philipp Müller <tim@centricular.com>
Sat, 9 Dec 2017 19:31:49 +0000 (19:31 +0000)
Use the reshape function after being defined. The other way
would have been to declare the reshape function in the header.

gstglwindow_cocoa.m: In function '-[GstGLNSView drawRect:]':
gstglwindow_cocoa.m:555: warning: 'GstGLNSView' may not respond to '-reshape'
gstglwindow_cocoa.m:555: warning: (Messages without a matching method signature
gstglwindow_cocoa.m:555: warning: will be assumed to return 'id' and accept
gstglwindow_cocoa.m:555: warning: '...' as arguments.)

gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m

index 8f55f20..c1fb7a7 100644 (file)
@@ -551,10 +551,6 @@ resize_cb (gpointer data)
   [super renewGState];
 }
 
-- (void)drawRect: (NSRect)dirtyRect {
-  [self reshape:nil];
-}
-
 - (void)reshape: (NSNotification*)notification {
   GstGLWindow *window;
 
@@ -583,6 +579,10 @@ resize_cb (gpointer data)
   }
 }
 
+- (void)drawRect: (NSRect)dirtyRect {
+  [self reshape:nil];
+}
+
 - (BOOL) isOpaque {
     return YES;
 }