diff options
| author | Tim Foley <tim.foley.is@gmail.com> | 2017-07-19 18:52:38 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-07-19 18:52:38 -0700 |
| commit | f07c01ceb012b9b325a8ecebd12cdd5797d8d5b3 (patch) | |
| tree | 0b93a109d51e6565560ad785519a863386490e2a /source/core/smart-pointer.h | |
| parent | a2b8b4c20632d79721052abd232fe2d1bdf2700d (diff) | |
| parent | 3f48e1c0d84bf4909954154ad147559656e87516 (diff) | |
Merge pull request #128 from tfoleyNV/improve-failure-modes
Try to improve handling of failures during compilation
Diffstat (limited to 'source/core/smart-pointer.h')
| -rw-r--r-- | source/core/smart-pointer.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/core/smart-pointer.h b/source/core/smart-pointer.h index fea149e06..87cb40d70 100644 --- a/source/core/smart-pointer.h +++ b/source/core/smart-pointer.h @@ -1,6 +1,7 @@ #ifndef FUNDAMENTAL_LIB_SMART_POINTER_H #define FUNDAMENTAL_LIB_SMART_POINTER_H +#include "common.h" #include "type-traits.h" #include <assert.h> @@ -36,7 +37,7 @@ namespace Slang void releaseReference() { - assert(referenceCount != 0); + SLANG_ASSERT(referenceCount != 0); if(--referenceCount == 0) { delete this; @@ -45,7 +46,7 @@ namespace Slang bool isUniquelyReferenced() { - assert(referenceCount != 0); + SLANG_ASSERT(referenceCount != 0); return referenceCount == 1; } }; |
