MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / marshal

Method marshal

include/daScript/misc/smart_ptr.h:48–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46 return ptr != nullptr;
47 }
48 __forceinline smart_ptr<T, smart_ptr_policy<T>> marshal() const {
49 if ( ptr ) {
50 smart_ptr<T, smart_ptr_policy<T>> res = ptr;
51 DAS_VERIFY ( !smart_ptr_policy<T>::delRef(ptr) );
52 return res;
53 } else {
54 return ptr;
55 }
56 }
57 __forceinline smart_ptr<T, smart_ptr_policy<T>> marshal( const smart_ptr<T, smart_ptr_policy<T>> & expr ) const {
58 if ( !ptr ) {
59 return nullptr;

Callers

nothing calls this directly

Calls 2

delRefFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected