log shader source code in debug build on error
This commit is contained in:
committed by
Mathias Agopian
parent
0d6c017cfb
commit
49dff3c439
@@ -45,6 +45,16 @@ CString::CString(const char* cstr, size_t length) {
|
||||
}
|
||||
}
|
||||
|
||||
CString::CString(size_t length) {
|
||||
if (length) {
|
||||
Data* p = (Data*)malloc(sizeof(Data) + length + 1);
|
||||
p->length = (size_type)length;
|
||||
mCStr = (value_type*)(p + 1);
|
||||
std::fill_n(mCStr, length, 0);
|
||||
mCStr[length] = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
CString::CString(const char* cstr)
|
||||
: CString(cstr, size_type(cstr ? strlen(cstr) : 0)) {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user