Skip to content
Extraits de code Groupes Projets
Valider 0a5fa6ff rédigé par Thomas Goyne's avatar Thomas Goyne
Parcourir les fichiers

Don't use ARC in the Obj-C++ code

It never allocated any non-autoreleased objects so ARC wasn't actually
doing anything other than breaking compilation with gcc.
parent afe02133
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -44,7 +44,6 @@ SRC += \ ...@@ -44,7 +44,6 @@ SRC += \
ifeq (yes, $(BUILD_DARWIN)) ifeq (yes, $(BUILD_DARWIN))
SRC += osx/util.mm SRC += osx/util.mm
osx/util.o: OBJCXXFLAGS += -fobjc-arc
endif endif
HEADER += \ HEADER += \
......
...@@ -84,7 +84,7 @@ std::string OSX_GetBundleAuxillaryExecutablePath(std::string const& executableNa ...@@ -84,7 +84,7 @@ std::string OSX_GetBundleAuxillaryExecutablePath(std::string const& executableNa
void OSX_OpenLocation(std::string const& location) { void OSX_OpenLocation(std::string const& location) {
@autoreleasepool { @autoreleasepool {
NSURL *url = [NSURL fileURLWithPath:[NSString stringWithUTF8String:location.c_str()]]; NSURL *url = [NSURL fileURLWithPath:[NSString stringWithUTF8String:location.c_str()]];
LSOpenCFURLRef((__bridge CFURLRef)url, NULL); LSOpenCFURLRef((CFURLRef)url, NULL);
} }
} }
......
...@@ -20,7 +20,6 @@ LDFLAGS += $(LDFLAGS_CCMALLOC) ...@@ -20,7 +20,6 @@ LDFLAGS += $(LDFLAGS_CCMALLOC)
ifeq (yes, $(BUILD_DARWIN)) ifeq (yes, $(BUILD_DARWIN))
SRC += osx_utils.mm SRC += osx_utils.mm
osx_utils.o: OBJCXXFLAGS += -fobjc-arc
endif endif
############### ###############
......
...@@ -23,14 +23,6 @@ ...@@ -23,14 +23,6 @@
#include "config.h" #include "config.h"
// This bit of awfulness is to disable some ARC-incompatible stuff in window.h
// that we don't need
#include <wx/brush.h>
#undef wxOSX_USE_COCOA_OR_IPHONE
#define wxOSX_USE_COCOA_OR_IPHONE 0
class WXDLLIMPEXP_FWD_CORE wxWidgetImpl;
typedef wxWidgetImpl wxOSXWidgetImpl;
#include <wx/window.h> #include <wx/window.h>
#import <AppKit/AppKit.h> #import <AppKit/AppKit.h>
...@@ -46,7 +38,7 @@ void AddFullScreenButton(wxWindow *window) { ...@@ -46,7 +38,7 @@ void AddFullScreenButton(wxWindow *window) {
} }
void SetFloatOnParent(wxWindow *window) { void SetFloatOnParent(wxWindow *window) {
__unsafe_unretained NSWindow *nsWindow = [window->GetHandle() window]; __block NSWindow *nsWindow = [window->GetHandle() window];
[nsWindow setLevel:NSFloatingWindowLevel]; [nsWindow setLevel:NSFloatingWindowLevel];
if (!([nsWindow collectionBehavior] & NSWindowCollectionBehaviorFullScreenPrimary)) if (!([nsWindow collectionBehavior] & NSWindowCollectionBehaviorFullScreenPrimary))
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter