Skip to content

Commit 9d1140a

Browse files
committed
Add OAG_ASSUME_NONNULL_BEGIN/END guards to Subgraph.hpp
1 parent d67e2bb commit 9d1140a

File tree

1 file changed

+8
-4
lines changed
  • Sources/OpenAttributeGraphCxx/include/OpenAttributeGraphCxx/Graph

1 file changed

+8
-4
lines changed

Sources/OpenAttributeGraphCxx/include/OpenAttributeGraphCxx/Graph/Subgraph.hpp

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

15+
OAG_ASSUME_NONNULL_BEGIN
16+
1517
typedef struct OAG_BRIDGED_TYPE(id) OAGSubgraphStorage * OAGSubgraphRef;
1618

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

31-
static Subgraph *from_cf(OAGSubgraphRef cf_subgraph) OAG_NOEXCEPT;
33+
static Subgraph *_Nullable from_cf(OAGSubgraphRef cf_subgraph) OAG_NOEXCEPT;
3234

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

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

4951
OAG_INLINE OAG_CONSTEXPR
50-
static Subgraph *get_current() OAG_NOEXCEPT {
52+
static Subgraph *_Nullable get_current() OAG_NOEXCEPT {
5153
return (OAG::Subgraph*)pthread_getspecific(OAG::Subgraph::current_key());
5254
}
5355

5456
OAG_INLINE OAG_CONSTEXPR
55-
static int set_current(Subgraph *subgraph) OAG_NOEXCEPT {
57+
static int set_current(Subgraph *_Nullable subgraph) OAG_NOEXCEPT {
5658
return pthread_setspecific(OAG::Subgraph::current_key(), subgraph);
5759
}
5860

@@ -109,3 +111,5 @@ class SubgraphObject final {
109111
}
110112

111113
#endif /* Subgraph_hpp */
114+
115+
OAG_ASSUME_NONNULL_END

0 commit comments

Comments
 (0)