summaryrefslogtreecommitdiffstats
path: root/slideshow
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2015-10-12 21:44:46 +0200
committerNoel Grandin <noelgrandin@gmail.com>2015-10-13 06:22:33 +0000
commited7361ef0bdb6bee4f47a8421221eb7824f02e38 (patch)
treeb745a27d916bb923f01857148e16485ac319f288 /slideshow
parentTDE: fix build of the address book driver, 2nd (diff)
downloadcore-ed7361ef0bdb6bee4f47a8421221eb7824f02e38.tar.gz
core-ed7361ef0bdb6bee4f47a8421221eb7824f02e38.zip
cppcheck:variableScope
Change-Id: I7cbd5a9e9bb5417f754d4e2445df309140fd40af Reviewed-on: https://gerrit.libreoffice.org/19329 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'slideshow')
-rw-r--r--slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx26
1 files changed, 13 insertions, 13 deletions
diff --git a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx
index c6c55cdd4e14..99651942558e 100644
--- a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx
+++ b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx
@@ -545,19 +545,19 @@ boost::shared_ptr<OGLTransitionImpl> makeIris()
Primitive irisPart, part;
int i, nSteps = 24, nParts = 7;
- double t = 1.0/nSteps, cx, cy, lcx, lcy, lx = 1, ly = 0, x, y, cxo, cyo, lcxo, lcyo, of=2.2, f=1.42;
+ double t = 1.0/nSteps, lx = 1, ly = 0, of=2.2, f=1.42;
for (i=1; i<=nSteps; i++) {
- x = cos ((3*2*M_PI*t)/nParts);
- y = -sin ((3*2*M_PI*t)/nParts);
- cx = (f*x + 1)/2;
- cy = (f*y + 1)/2;
- lcx = (f*lx + 1)/2;
- lcy = (f*ly + 1)/2;
- cxo = (of*x + 1)/2;
- cyo = (of*y + 1)/2;
- lcxo = (of*lx + 1)/2;
- lcyo = (of*ly + 1)/2;
+ double x = cos ((3*2*M_PI*t)/nParts);
+ double y = -sin ((3*2*M_PI*t)/nParts);
+ double cx = (f*x + 1)/2;
+ double cy = (f*y + 1)/2;
+ double lcx = (f*lx + 1)/2;
+ double lcy = (f*ly + 1)/2;
+ double cxo = (of*x + 1)/2;
+ double cyo = (of*y + 1)/2;
+ double lcxo = (of*lx + 1)/2;
+ double lcyo = (of*ly + 1)/2;
irisPart.pushTriangle (glm::vec2 (lcx, lcy),
glm::vec2 (lcxo, lcyo),
glm::vec2 (cx, cy));
@@ -1192,14 +1192,14 @@ boost::shared_ptr<OGLTransitionImpl> makeDiamond()
boost::shared_ptr<OGLTransitionImpl> makeVenetianBlinds( bool vertical, int parts )
{
static double t30 = tan( M_PI/6.0 );
- double n, ln = 0;
+ double ln = 0;
double p = 1.0/parts;
Primitives_t aLeavingSlide;
Primitives_t aEnteringSlide;
for( int i=0; i<parts; i++ ) {
Primitive Slide;
- n = (i + 1)/(double)parts;
+ double n = (i + 1)/(double)parts;
if( vertical ) {
Slide.pushTriangle (glm::vec2 (ln,0), glm::vec2 (n,0), glm::vec2 (ln,1));
Slide.pushTriangle (glm::vec2 (n,0), glm::vec2 (ln,1), glm::vec2 (n,1));