Skip to content

Commit

Permalink
Fix pessimizing std::move / allow copy elision
Browse files Browse the repository at this point in the history
/home/travis/build/spring/spring/rts/Rendering/GL/RenderDataBuffer.hpp:169:12: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]
  • Loading branch information
sprunk committed Jun 1, 2020
1 parent e9bcb80 commit 211597b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rts/Rendering/GL/RenderDataBuffer.hpp
Expand Up @@ -166,9 +166,9 @@ namespace GL {
if (inited)
return false;

elems = std::move(VBO(GL_ARRAY_BUFFER, persistent, readable));
indcs = std::move(VBO(GL_ELEMENT_ARRAY_BUFFER, persistent, readable));
shader = std::move(Shader::GLSLProgramObject());
elems = VBO(GL_ARRAY_BUFFER, persistent, readable);
indcs = VBO(GL_ELEMENT_ARRAY_BUFFER, persistent, readable);
shader = Shader::GLSLProgramObject();

elems.Generate();
indcs.Generate();
Expand Down

0 comments on commit 211597b

Please sign in to comment.