Skip to content

Commit 2eab2a3

Browse files
committed
Fix header build issue on Linux platform
1 parent 00c1035 commit 2eab2a3

File tree

3 files changed

+26
-26
lines changed

3 files changed

+26
-26
lines changed

Package.resolved

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Sources/OpenBox/Path/OBPathStorage.cpp

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,47 +8,47 @@
88

99
using namespace OB;
1010

11-
void OBPathStorageInit(OBPathStorage* dst, uint32_t capacity, OBPathStorage* source) {
11+
void OBPathStorageInit(OBPathStorageRef dst, uint32_t capacity, OBPathStorageRef source) {
1212
if (source != nullptr) {
1313
dst->storage = OB::Path::Storage(capacity, source->storage);
1414
} else {
1515
dst->storage = OB::Path::Storage(capacity);
1616
}
1717
}
1818

19-
void OBPathStorageDestroy(OBPathStorage storage) {
20-
storage.storage.~Storage();
19+
void OBPathStorageDestroy(OBPathStorageRef storage) {
20+
storage->storage.~Storage();
2121
}
2222

23-
void OBPathStorageClear(OBPathStorage storage) {
24-
storage.storage.clear();
23+
void OBPathStorageClear(OBPathStorageRef storage) {
24+
storage->storage.clear();
2525
}
2626

2727
// ...
2828

29-
bool OBPathStorageIsEmpty(OBPathStorage storage) {
30-
return storage.storage.isEmpty();
29+
bool OBPathStorageIsEmpty(OBPathStorageRef storage) {
30+
return storage->storage.isEmpty();
3131
}
3232

33-
bool OBPathStorageEqualToStorage(OBPathStorage lhs, OBPathStorage rhs) {
34-
return lhs.storage == rhs.storage;
33+
bool OBPathStorageEqualToStorage(OBPathStorageRef lhs, OBPathStorageRef rhs) {
34+
return lhs->storage == rhs->storage;
3535
}
3636

37-
bool OBPathStorageIsSingleElement(OBPathStorage storage) {
38-
return storage.storage.flags().isSingleElement();
37+
bool OBPathStorageIsSingleElement(OBPathStorageRef storage) {
38+
return storage->storage.flags().isSingleElement();
3939
}
4040

41-
uint32_t OBPathStorageGetBezierOrder(OBPathStorage storage) {
42-
return storage.storage.flags().bezierOrder();
41+
uint32_t OBPathStorageGetBezierOrder(OBPathStorageRef storage) {
42+
return storage->storage.flags().bezierOrder();
4343
}
4444

4545
#if OB_TARGET_OS_DARWIN
4646

47-
CGRect OBPathStorageGetBoundingRect(OBPathStorage storage) {
47+
CGRect OBPathStorageGetBoundingRect(OBPathStorageRef storage) {
4848
precondition_failure("TODO");
4949
}
5050

51-
CGPathRef OBPathStorageGetCGPath(OBPathStorage storage) {
51+
CGPathRef OBPathStorageGetCGPath(OBPathStorageRef storage) {
5252
precondition_failure("TODO");
5353
}
5454
#endif

Sources/OpenBox/include/OBPathStorage.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,44 +18,44 @@ OB_EXTERN_C_BEGIN
1818

1919
OB_EXPORT
2020
OB_REFINED_FOR_SWIFT
21-
void OBPathStorageInit(OBPathStorage* dst, uint32_t capacity, OBPathStorage* _Nullable source);
21+
void OBPathStorageInit(OBPathStorageRef dst, uint32_t capacity, OBPathStorageRef _Nullable source);
2222

2323
OB_EXPORT
2424
OB_REFINED_FOR_SWIFT
25-
void OBPathStorageDestroy(OBPathStorage storage) OB_SWIFT_NAME(OBPathStorage.destroy(self:));
25+
void OBPathStorageDestroy(OBPathStorageRef storage) OB_SWIFT_NAME(OBPathStorage.destroy(self:));
2626

2727
OB_EXPORT
2828
OB_REFINED_FOR_SWIFT
29-
void OBPathStorageClear(OBPathStorage storage) OB_SWIFT_NAME(OBPathStorage.clear(self:));
29+
void OBPathStorageClear(OBPathStorageRef storage) OB_SWIFT_NAME(OBPathStorage.clear(self:));
3030

3131
//OB_EXPORT
3232
//OB_REFINED_FOR_SWIFT
3333
//void OBPathStorageAppendPath(OBPathStorage, OBPath);
3434

3535
OB_EXPORT
3636
OB_REFINED_FOR_SWIFT
37-
bool OBPathStorageIsEmpty(OBPathStorage storage) OB_SWIFT_NAME(getter:OBPathStorage.isEmpty(self:));
37+
bool OBPathStorageIsEmpty(OBPathStorageRef storage) OB_SWIFT_NAME(getter:OBPathStorage.isEmpty(self:));
3838

3939
OB_EXPORT
4040
OB_REFINED_FOR_SWIFT
41-
bool OBPathStorageEqualToStorage(OBPathStorage lhs, OBPathStorage rhs) OB_SWIFT_NAME(OBPathStorage.isEqualTo(self:_:));
41+
bool OBPathStorageEqualToStorage(OBPathStorageRef lhs, OBPathStorageRef rhs) OB_SWIFT_NAME(OBPathStorage.isEqualTo(self:_:));
4242

4343
OB_EXPORT
4444
OB_REFINED_FOR_SWIFT
45-
bool OBPathStorageIsSingleElement(OBPathStorage storage) OB_SWIFT_NAME(getter:OBPathStorage.isSingleElement(self:));
45+
bool OBPathStorageIsSingleElement(OBPathStorageRef storage) OB_SWIFT_NAME(getter:OBPathStorage.isSingleElement(self:));
4646

4747
OB_EXPORT
4848
OB_REFINED_FOR_SWIFT
49-
uint32_t OBPathStorageGetBezierOrder(OBPathStorage storage) OB_SWIFT_NAME(getter:OBPathStorage.bezierOrder(self:));
49+
uint32_t OBPathStorageGetBezierOrder(OBPathStorageRef storage) OB_SWIFT_NAME(getter:OBPathStorage.bezierOrder(self:));
5050

5151
#if OB_TARGET_OS_DARWIN
5252
OB_EXPORT
5353
OB_REFINED_FOR_SWIFT
54-
CGRect OBPathStorageGetBoundingRect(OBPathStorage storage) OB_SWIFT_NAME(getter:OBPathStorage.boundingRect(self:));
54+
CGRect OBPathStorageGetBoundingRect(OBPathStorageRef storage) OB_SWIFT_NAME(getter:OBPathStorage.boundingRect(self:));
5555

5656
OB_EXPORT
5757
OB_REFINED_FOR_SWIFT
58-
CGPathRef RBPathStorageGetCGPath(OBPathStorage storage) OB_SWIFT_NAME(getter:OBPathStorage.cgPath(self:));
58+
CGPathRef RBPathStorageGetCGPath(OBPathStorageRef storage) OB_SWIFT_NAME(getter:OBPathStorage.cgPath(self:));
5959
#endif
6060

6161
OB_EXTERN_C_END

0 commit comments

Comments
 (0)