summaryrefslogtreecommitdiff
path: root/source/core/slang-string.h
diff options
context:
space:
mode:
authorTim Foley <tim.foley.is@gmail.com>2017-07-19 18:52:38 -0700
committerGitHub <noreply@github.com>2017-07-19 18:52:38 -0700
commitf07c01ceb012b9b325a8ecebd12cdd5797d8d5b3 (patch)
tree0b93a109d51e6565560ad785519a863386490e2a /source/core/slang-string.h
parenta2b8b4c20632d79721052abd232fe2d1bdf2700d (diff)
parent3f48e1c0d84bf4909954154ad147559656e87516 (diff)
Merge pull request #128 from tfoleyNV/improve-failure-modes
Try to improve handling of failures during compilation
Diffstat (limited to 'source/core/slang-string.h')
-rw-r--r--source/core/slang-string.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/core/slang-string.h b/source/core/slang-string.h
index 3c1b48e8c..552afe833 100644
--- a/source/core/slang-string.h
+++ b/source/core/slang-string.h
@@ -1,8 +1,10 @@
#ifndef FUNDAMENTAL_LIB_STRING_H
#define FUNDAMENTAL_LIB_STRING_H
+
#include <string.h>
#include <cstdlib>
#include <stdio.h>
+
#include "smart-pointer.h"
#include "common.h"
#include "hash.h"
@@ -80,7 +82,7 @@ namespace Slang
static StringRepresentation* createWithCapacityAndLength(UInt capacity, UInt length)
{
- assert(capacity >= length);
+ SLANG_ASSERT(capacity >= length);
void* allocation = operator new(sizeof(StringRepresentation) + capacity + 1);
StringRepresentation* obj = new(allocation) StringRepresentation();
obj->capacity = capacity;