Browse Source

Work around buggy C++11 standard libraries (mingw)

--HG--
branch : minor
Alex Szpakowski 8 năm trước cách đây
mục cha
commit
5e5b247fc7

+ 5 - 1
src/modules/graphics/opengl/Shader.cpp

@@ -27,6 +27,7 @@
 // C++
 // C++
 #include <algorithm>
 #include <algorithm>
 #include <limits>
 #include <limits>
+#include <sstream>
 
 
 namespace love
 namespace love
 {
 {
@@ -312,7 +313,10 @@ void Shader::mapActiveUniforms()
 
 
 				if (u.count > 1)
 				if (u.count > 1)
 				{
 				{
-					std::string indexname = u.name + "[" + std::to_string(i) + "]";
+					std::ostringstream ss;
+					ss << i;
+
+					std::string indexname = u.name + "[" + ss.str() + "]";
 					location = glGetUniformLocation(program, indexname.c_str());
 					location = glGetUniformLocation(program, indexname.c_str());
 				}
 				}