summaryrefslogtreecommitdiff
path: root/slideshow/source
diff options
context:
space:
mode:
authorKeldin Maldonado (KNM) <kemaldonado@csumb.edu>2024-02-03 04:41:08 -0800
committerHossein <hossein@libreoffice.org>2024-02-12 13:30:40 +0100
commit5dadcd1ea9e63bcbc0a5d4c4cd95d7d8b37edef9 (patch)
treee688d5280691fb9b7672076f9e468ec2a6342360 /slideshow/source
parent2220b3718fd831e78485cba2a272e9af08907ddd (diff)
tdf#145538 use range based for loops
using range based for loops instead of index based to increase readability in codebase Change-Id: Ib8c3ec3796fce9228cee1d90beb924128b0dea3f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162950 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
Diffstat (limited to 'slideshow/source')
-rw-r--r--slideshow/source/engine/opengl/TransitionImpl.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/slideshow/source/engine/opengl/TransitionImpl.cxx b/slideshow/source/engine/opengl/TransitionImpl.cxx
index ba43acddc38c..99adca7f7bea 100644
--- a/slideshow/source/engine/opengl/TransitionImpl.cxx
+++ b/slideshow/source/engine/opengl/TransitionImpl.cxx
@@ -144,8 +144,8 @@ bool OGLTransitionImpl::prepare( sal_Int32 glLeavingSlideTex, sal_Int32 glEnteri
CHECK_GL_ERROR();
const SceneObjects_t& rSceneObjects(maScene.getSceneObjects());
- for(size_t i(0); i != rSceneObjects.size(); ++i) {
- rSceneObjects[i]->prepare(m_nProgramObject);
+ for(const auto& rSceneObject : rSceneObjects) {
+ rSceneObject->prepare(m_nProgramObject);
}
GLint location = glGetUniformLocation( m_nProgramObject, "leavingSlideTexture" );
@@ -208,8 +208,8 @@ bool OGLTransitionImpl::prepare( sal_Int32 glLeavingSlideTex, sal_Int32 glEnteri
void OGLTransitionImpl::finish()
{
const SceneObjects_t& rSceneObjects(maScene.getSceneObjects());
- for(size_t i(0); i != rSceneObjects.size(); ++i) {
- rSceneObjects[i]->finish();
+ for(const auto& rSceneObject : rSceneObjects) {
+ rSceneObject->finish();
}
finishTransition();
@@ -278,8 +278,8 @@ void OGLTransitionImpl::applyOverallOperations( double nTime, double SlideWidthS
{
const Operations_t& rOverallOperations(maScene.getOperations());
glm::mat4 matrix;
- for(size_t i(0); i != rOverallOperations.size(); ++i)
- rOverallOperations[i]->interpolate(matrix, nTime, SlideWidthScale, SlideHeightScale);
+ for(const auto& rOperation : rOverallOperations)
+ rOperation->interpolate(matrix, nTime, SlideWidthScale, SlideHeightScale);
CHECK_GL_ERROR();
if (m_nOperationsTransformLocation != -1) {
glUniformMatrix4fv(m_nOperationsTransformLocation, 1, false, glm::value_ptr(matrix));
@@ -340,8 +340,8 @@ void OGLTransitionImpl::displayScene( double nTime, double SlideWidth, double Sl
{
const SceneObjects_t& rSceneObjects(maScene.getSceneObjects());
CHECK_GL_ERROR();
- for(size_t i(0); i != rSceneObjects.size(); ++i)
- rSceneObjects[i]->display(m_nSceneTransformLocation, m_nPrimitiveTransformLocation, nTime, SlideWidth, SlideHeight, DispWidth, DispHeight);
+ for(const auto& rSceneObject : rSceneObjects)
+ rSceneObject->display(m_nSceneTransformLocation, m_nPrimitiveTransformLocation, nTime, SlideWidth, SlideHeight, DispWidth, DispHeight);
CHECK_GL_ERROR();
}