소스 검색

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

--HG--
branch : minor
Alex Szpakowski 9 년 전
부모
커밋
5e5b247fc7
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      src/modules/graphics/opengl/Shader.cpp

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

@@ -27,6 +27,7 @@
 // C++
 #include <algorithm>
 #include <limits>
+#include <sstream>
 
 namespace love
 {
@@ -312,7 +313,10 @@ void Shader::mapActiveUniforms()
 
 				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());
 				}