X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=effect_chain.cpp;h=0e20ce097be8a29ff85ff9b4fbe089a273ddbe75;hb=dce0f4f2b6d57aa02f2074fdb3925c756d2a96ba;hp=34a396aa607ab65db3e64f4f9f57a1273e45f021;hpb=b89deb99c8e5d5e96d502a7c90b2bbc7daaac822;p=movit diff --git a/effect_chain.cpp b/effect_chain.cpp index 34a396a..0e20ce0 100644 --- a/effect_chain.cpp +++ b/effect_chain.cpp @@ -1906,10 +1906,8 @@ void EffectChain::render_to_fbo(GLuint dest_fbo, unsigned width, unsigned height } } - for (map::const_iterator texture_it = output_textures.begin(); - texture_it != output_textures.end(); - ++texture_it) { - resource_pool->release_2d_texture(texture_it->second); + for (const auto &phase_and_texnum : output_textures) { + resource_pool->release_2d_texture(phase_and_texnum.second); } glBindFramebuffer(GL_FRAMEBUFFER, 0); @@ -1926,8 +1924,8 @@ void EffectChain::render_to_fbo(GLuint dest_fbo, unsigned width, unsigned height // Get back the timer queries. for (unsigned phase_num = 0; phase_num < phases.size(); ++phase_num) { Phase *phase = phases[phase_num]; - for (std::list::iterator timer_it = phase->timer_query_objects_running.begin(); - timer_it != phase->timer_query_objects_running.end(); ) { + for (auto timer_it = phase->timer_query_objects_running.cbegin(); + timer_it != phase->timer_query_objects_running.cend(); ) { GLint timer_query_object = *timer_it; GLint available; glGetQueryObjectiv(timer_query_object, GL_QUERY_RESULT_AVAILABLE, &available);