Skip to content

Commit

Permalink
Fix compilation
Browse files Browse the repository at this point in the history
Signed-off-by: vade <vade@vade.info>
  • Loading branch information
vade committed Sep 25, 2024
1 parent b3abf2c commit 91fadb1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
8 changes: 1 addition & 7 deletions Sources/objc/include/CxxAny.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@

#import "opentime.h"

#if defined(__cplusplus)
#import <any/any.hpp>
#import "opentimelineio.h"
namespace otio = opentimelineio::OPENTIMELINEIO_VERSION;
#endif


typedef union CxxAnyValue {
bool b;
int64_t i;
Expand Down Expand Up @@ -46,6 +39,7 @@ typedef struct CxxAny {
} CxxAny;

#if defined(__cplusplus)
#import <any>
void otio_any_to_cxx_any(std::any const&, CxxAny*);
std::any cxx_any_to_otio_any(CxxAny const&);
#endif
1 change: 1 addition & 0 deletions Sources/objc/include/CxxAnyDictionaryIterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
// Copyright Contributors to the OpenTimelineIO project

#import <Foundation/Foundation.h>
#import "CxxAny.h"
#import "opentime.h"
#import "CxxAnyDictionaryMutationStamp.h"

Expand Down
6 changes: 3 additions & 3 deletions Sources/objc/opentimelineio.mm
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ void item_set_source_range(CxxRetainer* self , CxxTimeRange tr) {

void item_set_source_range_to_null(CxxRetainer* self) {
auto item = SO_cast<otio::Item>(self);
item->set_source_range(otio::optional<otio::TimeRange>());
item->set_source_range(std::optional<otio::TimeRange>());
}

CxxTimeRange item_available_range(CxxRetainer* self, CxxErrorStruct* cxxErr) {
Expand Down Expand Up @@ -628,7 +628,7 @@ void media_reference_set_available_range(CxxRetainer* self, CxxTimeRange tr) {
}

void media_reference_clear_available_range(CxxRetainer* self) {
SO_cast<otio::MediaReference>(self)->set_available_range(otio::nullopt);
SO_cast<otio::MediaReference>(self)->set_available_range(std::nullopt);
}

// MARK: - Timeline
Expand All @@ -655,7 +655,7 @@ void timeline_set_global_start_time(CxxRetainer* self, CxxRationalTime rt) {
}

void timeline_clear_global_start_time(CxxRetainer* self) {
SO_cast<otio::Timeline>(self)->set_global_start_time(otio::nullopt);
SO_cast<otio::Timeline>(self)->set_global_start_time(std::nullopt);
}

CxxRationalTime timeline_duration(CxxRetainer* self, CxxErrorStruct* cxxErr) {
Expand Down

0 comments on commit 91fadb1

Please sign in to comment.