From d6dff83397a8edc544798775342269d231259325 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Mon, 2 Oct 2023 19:05:21 -0400 Subject: [PATCH] MacPDF: Introduce CocoaWrapper.h No behavior change. --- Meta/Lagom/Contrib/MacPDF/CocoaWrapper.h | 12 ++++++++++++ Meta/Lagom/Contrib/MacPDF/MacPDFDocument.h | 5 +---- Meta/Lagom/Contrib/MacPDF/MacPDFView.h | 5 +---- 3 files changed, 14 insertions(+), 8 deletions(-) create mode 100644 Meta/Lagom/Contrib/MacPDF/CocoaWrapper.h diff --git a/Meta/Lagom/Contrib/MacPDF/CocoaWrapper.h b/Meta/Lagom/Contrib/MacPDF/CocoaWrapper.h new file mode 100644 index 0000000000..3ae5460e97 --- /dev/null +++ b/Meta/Lagom/Contrib/MacPDF/CocoaWrapper.h @@ -0,0 +1,12 @@ +/* + * Copyright (c) 2023, Nico Weber + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#pragma once + +// Several AK types conflict with MacOS types. +#define FixedPoint FixedPointMacOS +#import +#undef FixedPoint diff --git a/Meta/Lagom/Contrib/MacPDF/MacPDFDocument.h b/Meta/Lagom/Contrib/MacPDF/MacPDFDocument.h index 85180eaefa..737889e9be 100644 --- a/Meta/Lagom/Contrib/MacPDF/MacPDFDocument.h +++ b/Meta/Lagom/Contrib/MacPDF/MacPDFDocument.h @@ -6,10 +6,7 @@ #pragma once -// Several AK types conflict with MacOS types. -#define FixedPoint FixedPointMacOS -#import -#undef FixedPoint +#include "CocoaWrapper.h" #import "MacPDFView.h" diff --git a/Meta/Lagom/Contrib/MacPDF/MacPDFView.h b/Meta/Lagom/Contrib/MacPDF/MacPDFView.h index 98e7975fc8..e23684a91b 100644 --- a/Meta/Lagom/Contrib/MacPDF/MacPDFView.h +++ b/Meta/Lagom/Contrib/MacPDF/MacPDFView.h @@ -6,10 +6,7 @@ #pragma once -// Several AK types conflict with MacOS types. -#define FixedPoint FixedPointMacOS -#import -#undef FixedPoint +#include "CocoaWrapper.h" #include #include