get rid of std::string in OpenGLProgram

This was generating tons of code.
This commit is contained in:
Mathias Agopian
2018-11-15 17:34:09 -08:00
committed by Mathias Agopian
parent 815fb36b98
commit 1212728e45
3 changed files with 32 additions and 7 deletions

View File

@@ -35,6 +35,9 @@ int StaticString::compare(const StaticString& rhs) const noexcept {
UTILS_NOINLINE
CString::CString(const char* cstr, size_type length) {
if (length && cstr) {
// I think we can't use this assert with vulkan, because shaders are returned as CString
// (see ShaderBuilder).
// assert(length == strlen(cstr));
Data* p = (Data*)malloc(sizeof(Data) + length + 1);
p->length = length;
mCStr = (value_type*)(p + 1);