aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil Hodgson <nyamatongwe@gmail.com>2023-02-24 09:43:22 +1100
committerNeil Hodgson <nyamatongwe@gmail.com>2023-02-24 09:43:22 +1100
commitd75ac05416e341c02195260d1106a17932a3032f (patch)
treee9acf53faf350beb0230c7e9cfe482b62cf2c289
parent848feea717a5dde6d3c06ea2e8017f07882cdc6d (diff)
downloadscintilla-mirror-d75ac05416e341c02195260d1106a17932a3032f.tar.gz
Avoid deprecation warning that occurs even though the non-deprecated name is
used when available.
-rw-r--r--cocoa/ScintillaCocoa.mm4
1 files changed, 4 insertions, 0 deletions
diff --git a/cocoa/ScintillaCocoa.mm b/cocoa/ScintillaCocoa.mm
index 5b3d1178c..c12bf3efb 100644
--- a/cocoa/ScintillaCocoa.mm
+++ b/cocoa/ScintillaCocoa.mm
@@ -1373,7 +1373,11 @@ void ScintillaCocoa::StartDrag() {
if (@available(macOS 10.13, *)) {
pasteboard = [NSPasteboard pasteboardWithName: NSPasteboardNameDrag];
} else {
+ // Use old deprecated name
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
pasteboard = [NSPasteboard pasteboardWithName: NSDragPboard];
+#pragma clang diagnostic pop
}
CopySelectionRange(&selectedText);
SetPasteboardData(pasteboard, selectedText);