From b1468d9dcc540e9117da4d416fe890062097c3d3 Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Sun, 22 Jul 2018 22:51:08 +0200 Subject: [PATCH] - somehow visual studio 2015 miscompiles this so badly it triggers an out of bounds assert in STL! --- src/hwrenderer/data/shaderuniforms.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hwrenderer/data/shaderuniforms.h b/src/hwrenderer/data/shaderuniforms.h index 40cb0e4cd..9400fa0a5 100644 --- a/src/hwrenderer/data/shaderuniforms.h +++ b/src/hwrenderer/data/shaderuniforms.h @@ -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";