Skip to content

Commit 5dd2d74

Browse files
committed
Add OG_ASSUME_NONNULL_BEGIN/END guards to Subgraph.hpp
1 parent c71ccfc commit 5dd2d74

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

Sources/OpenGraphCxx/include/OpenGraphCxx/Graph/Subgraph.hpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
#include <OpenGraphCxx/Runtime/metadata.hpp>
1313
#include <pthread.h>
1414

15+
OG_ASSUME_NONNULL_BEGIN
16+
1517
typedef struct OG_BRIDGED_TYPE(id) OGSubgraphStorage * OGSubgraphRef;
1618

1719
namespace OG {
@@ -28,9 +30,9 @@ class Subgraph final {
2830
public:
2931
// MARK: - CF related
3032

31-
static Subgraph *from_cf(OGSubgraphRef cf_subgraph) OG_NOEXCEPT;
33+
static Subgraph *_Nullable from_cf(OGSubgraphRef cf_subgraph) OG_NOEXCEPT;
3234

33-
OGSubgraphRef to_cf() const OG_NOEXCEPT {
35+
_Nullable OGSubgraphRef to_cf() const OG_NOEXCEPT {
3436
return reinterpret_cast<OGSubgraphRef>(_object);
3537
}
3638

@@ -47,12 +49,12 @@ class Subgraph final {
4749
}
4850

4951
OG_INLINE OG_CONSTEXPR
50-
static Subgraph *get_current() OG_NOEXCEPT {
52+
static Subgraph *_Nullable get_current() OG_NOEXCEPT {
5153
return (OG::Subgraph*)pthread_getspecific(OG::Subgraph::current_key());
5254
}
5355

5456
OG_INLINE OG_CONSTEXPR
55-
static int set_current(Subgraph *subgraph) OG_NOEXCEPT {
57+
static int set_current(Subgraph *_Nullable subgraph) OG_NOEXCEPT {
5658
return pthread_setspecific(OG::Subgraph::current_key(), subgraph);
5759
}
5860

@@ -108,3 +110,5 @@ class SubgraphObject final {
108110
}
109111

110112
#endif /* Subgraph_hpp */
113+
114+
OG_ASSUME_NONNULL_END

0 commit comments

Comments
 (0)