vlc | branch: master | Marvin Scholz <[email protected]> | Fri Jun 2 18:12:02 2017 +0200| [2dd9e9cafc2869efbeee5ca3094e1aa95b12a979] | committer: Marvin Scholz
macOS: Clarify useless-looking code in VLCDocumentController Clarify why the VLCDocumentController is allocated and initialized in the load method, so other developers are not confused by or accidentally delete it, as it looks useless. Additionally do not assign to an unused variable but just cast the result to void, to make clear it is unused on purpose. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2dd9e9cafc2869efbeee5ca3094e1aa95b12a979 --- modules/gui/macosx/VLCDocumentController.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/gui/macosx/VLCDocumentController.m b/modules/gui/macosx/VLCDocumentController.m index a752c6b210..e97991b2b3 100644 --- a/modules/gui/macosx/VLCDocumentController.m +++ b/modules/gui/macosx/VLCDocumentController.m @@ -27,7 +27,11 @@ + (void)load { - id controller = [[VLCDocumentController alloc] init]; + /* For the custom document controller to be used by the app, + * it needs to be created before the default NSDocumentController + * is created. + */ + (void)[[VLCDocumentController alloc] init]; } - (IBAction)clearRecentDocuments:(id)sender _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
