From 12635b65716231e38ccc24b038e95594a65453ea Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 10 Jun 2016 13:31:51 +0100 Subject: [PATCH] Reordered paramter usage to fix coverity warning about parameter names not matching --- src/osgPresentation/SlideShowConstructor.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/osgPresentation/SlideShowConstructor.cpp b/src/osgPresentation/SlideShowConstructor.cpp index 108cdcc10..2ab07cedd 100644 --- a/src/osgPresentation/SlideShowConstructor.cpp +++ b/src/osgPresentation/SlideShowConstructor.cpp @@ -1024,9 +1024,10 @@ osg::Geometry* SlideShowConstructor::createTexturedQuadGeometry(const osg::Vec3& } if (texture) { - float t(0), l(0); - float r = (texture->getTextureTarget() == GL_TEXTURE_RECTANGLE) ? image->s() : 1; - float b = (texture->getTextureTarget() == GL_TEXTURE_RECTANGLE) ? image->t() : 1; + float l = 0.0f; + float b = 0.0f; + float r = (texture->getTextureTarget() == GL_TEXTURE_RECTANGLE) ? static_cast(image->s()) : 1.0f; + float t = (texture->getTextureTarget() == GL_TEXTURE_RECTANGLE) ? static_cast(image->t()) : 1.0f; if (flipYAxis) std::swap(t,b); @@ -1034,7 +1035,7 @@ osg::Geometry* SlideShowConstructor::createTexturedQuadGeometry(const osg::Vec3& pictureQuad = osg::createTexturedQuadGeometry(positionVec, widthVec, heightVec, - l, t, r, b); + l, b, r, t); stateset = pictureQuad->getOrCreateStateSet(); stateset->setTextureAttributeAndModes(0, @@ -1051,7 +1052,7 @@ osg::Geometry* SlideShowConstructor::createTexturedQuadGeometry(const osg::Vec3& OSG_INFO<<"Reading video "<getFileName()<setClientStorageHint(true); + if (texture) texture->setClientStorageHint(true); #endif }