Skip to content

Commit

Permalink
Fix for C++ header in public Objective-C header (#2156)
Browse files Browse the repository at this point in the history
  • Loading branch information
stefankarschti authored Feb 28, 2024
1 parent 003c062 commit 649f4a5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
4 changes: 4 additions & 0 deletions platform/darwin/app/ExampleCustomDrawableStyleLayer.mm
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
#include <memory>
#include <cmath>

@interface MLNCustomDrawableStyleLayer (Internal)
- (instancetype)initWithPendingLayer:(std::unique_ptr<mbgl::style::Layer>)pendingLayer;
@end

class ExampleCustomDrawableStyleLayerHost;

@implementation ExampleCustomDrawableStyleLayer
Expand Down
9 changes: 0 additions & 9 deletions platform/darwin/src/MLNCustomDrawableStyleLayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,6 @@
#import "MLNStyleLayer.h"
#import "MLNGeometry.h"

#ifdef __cplusplus
#include <mbgl/style/layer.hpp>
#endif

MLN_EXPORT
@interface MLNCustomDrawableStyleLayer : MLNStyleLayer

#ifdef __cplusplus
- (instancetype)initWithPendingLayer:(std::unique_ptr<mbgl::style::Layer>)pendingLayer;
#endif

@end
6 changes: 6 additions & 0 deletions platform/darwin/src/MLNCustomDrawableStyleLayer.mm
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@
#include <memory>
#include <cmath>

#include <mbgl/style/layer.hpp>

@interface MLNCustomDrawableStyleLayer (Internal)
- (instancetype)initWithPendingLayer:(std::unique_ptr<mbgl::style::Layer>)pendingLayer;
@end

@implementation MLNCustomDrawableStyleLayer

- (instancetype)initWithRawLayer:(mbgl::style::Layer *)rawLayer {
Expand Down

0 comments on commit 649f4a5

Please sign in to comment.