mirror of https://github.com/odrling/Aegisub
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.
This commit is contained in:
parent
afe0213317
commit
0a5fa6ff39
|
@ -44,7 +44,6 @@ SRC += \
|
|||
|
||||
ifeq (yes, $(BUILD_DARWIN))
|
||||
SRC += osx/util.mm
|
||||
osx/util.o: OBJCXXFLAGS += -fobjc-arc
|
||||
endif
|
||||
|
||||
HEADER += \
|
||||
|
|
|
@ -84,7 +84,7 @@ std::string OSX_GetBundleAuxillaryExecutablePath(std::string const& executableNa
|
|||
void OSX_OpenLocation(std::string const& location) {
|
||||
@autoreleasepool {
|
||||
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)
|
|||
|
||||
ifeq (yes, $(BUILD_DARWIN))
|
||||
SRC += osx_utils.mm
|
||||
osx_utils.o: OBJCXXFLAGS += -fobjc-arc
|
||||
endif
|
||||
|
||||
###############
|
||||
|
|
|
@ -23,14 +23,6 @@
|
|||
|
||||
#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>
|
||||
|
||||
#import <AppKit/AppKit.h>
|
||||
|
@ -46,7 +38,7 @@ void AddFullScreenButton(wxWindow *window) {
|
|||
}
|
||||
|
||||
void SetFloatOnParent(wxWindow *window) {
|
||||
__unsafe_unretained NSWindow *nsWindow = [window->GetHandle() window];
|
||||
__block NSWindow *nsWindow = [window->GetHandle() window];
|
||||
[nsWindow setLevel:NSFloatingWindowLevel];
|
||||
|
||||
if (!([nsWindow collectionBehavior] & NSWindowCollectionBehaviorFullScreenPrimary))
|
||||
|
|
Loading…
Reference in New Issue