Skip to content

Commit dde3fcc

Browse files
committed
Fix Linux build: guard Darwin-only CGPath code
1 parent b698b77 commit dde3fcc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Sources/OpenRenderBox/Path/PathStorage.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,13 @@ Storage::~Storage() {
6767
}
6868
// TODO: MapCache
6969
if (flags().isExternal()) {
70+
#if ORB_TARGET_OS_DARWIN
7071
if (cachedCGPath() != nullptr) {
7172
auto oldCache = cachedCGPath();
7273
_cached_cgPath = nullptr;
7374
CFRelease(oldCache);
7475
}
76+
#endif
7577
free((void *)external_storage());
7678
}
7779
}
@@ -107,6 +109,7 @@ bool Storage::apply_elements_(void *info, ORBPathApplyCallback callback) const O
107109
return true;
108110
}
109111

112+
#if ORB_TARGET_OS_DARWIN
110113
CGPathRef Storage::cgpath() const ORB_NOEXCEPT {
111114
if (flags().isInline()) {
112115
return nullptr;
@@ -145,6 +148,7 @@ CGPathRef Storage::cgpath() const ORB_NOEXCEPT {
145148
return expected;
146149
}
147150
}
151+
#endif
148152

149153
} /* Path */
150154
} /* ORB */

0 commit comments

Comments
 (0)