summaryrefslogtreecommitdiffstats
path: root/source/core/slang-smart-pointer.h
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2019-06-19 16:54:12 -0400
committerGitHub <noreply@github.com>2019-06-19 16:54:12 -0400
commitbabe8e78d9f431d5f751859d159bbb3df37987c7 (patch)
tree0ba44ecdbe8061ef2b576777d2d43aa64c7e0fe1 /source/core/slang-smart-pointer.h
parent442f8c6d3d42b892e3f13128bcb6487ff7508f0d (diff)
Feature/shared library review (#992)
* Added setNull to RefPtr Renamed combineBuilder into combineIntoBuilder * Added Path::append
Diffstat (limited to 'source/core/slang-smart-pointer.h')
-rw-r--r--source/core/slang-smart-pointer.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/core/slang-smart-pointer.h b/source/core/slang-smart-pointer.h
index bae30de37..ebc6f20b0 100644
--- a/source/core/slang-smart-pointer.h
+++ b/source/core/slang-smart-pointer.h
@@ -235,6 +235,12 @@ namespace Slang
return rs;
}
+ SLANG_FORCE_INLINE void setNull()
+ {
+ releaseReference(pointer);
+ pointer = nullptr;
+ }
+
/// Get ready for writing (nulls contents)
SLANG_FORCE_INLINE T** writeRef() { *this = nullptr; return &pointer; }