Browse Source

Fix a use of std::remove_if

--HG--
branch : minor
Alex Szpakowski 9 years ago
parent
commit
7eeca829e5
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/modules/window/sdl/Window.cpp

+ 3 - 1
src/modules/window/sdl/Window.cpp

@@ -245,10 +245,12 @@ std::vector<Window::ContextAttribs> Window::getContextAttribsList() const
 
 
 	if (removeES3)
 	if (removeES3)
 	{
 	{
-		std::remove_if(attribslist.begin(), attribslist.end(), [](ContextAttribs a)
+		auto it = std::remove_if(attribslist.begin(), attribslist.end(), [](ContextAttribs a)
 		{
 		{
 			return a.gles && a.versionMajor >= 3;
 			return a.gles && a.versionMajor >= 3;
 		});
 		});
+
+		attribslist.erase(it, attribslist.end());
 	}
 	}
 
 
 	// Move OpenGL ES to the front of the list if we should prefer GLES.
 	// Move OpenGL ES to the front of the list if we should prefer GLES.