- somehow visual studio 2015 miscompiles this so badly it triggers an out of bounds assert in STL!

This commit is contained in:
Magnus Norddahl 2018-07-22 22:51:08 +02:00
parent 2382b9a238
commit b1468d9dcc

View file

@ -54,9 +54,9 @@ public:
layout.Format("std140, binding = %d", bindingpoint);
}
decl.Format("layout(%s) uniform %s\n{\n", layout.GetChars(), name);
for (const auto &field : fields)
for (size_t i = 0; i < fields.size(); i++)
{
decl.AppendFormat("\t%s %s;\n", GetTypeStr(field.Type), field.Name);
decl.AppendFormat("\t%s %s;\n", GetTypeStr(fields[i].Type), fields[i].Name);
}
decl += "};\n";