Remove unused virtual modifiers in DebugHUD

/home/elsid/dev/openmw/components/sceneutil/mwshadowtechnique.cpp:3127:9: warning: Call to virtual function during construction [clang-analyzer-optin.cplusplus.VirtualCall]
        addAnotherShadowMap();
        ^
/home/elsid/dev/openmw/components/sceneutil/mwshadowtechnique.cpp:3094:5: note: Loop condition is true.  Entering loop body
    for (int i = 0; i < 2; ++i)
    ^
/home/elsid/dev/openmw/components/sceneutil/mwshadowtechnique.cpp:3094:5: note: Loop condition is true.  Entering loop body
/home/elsid/dev/openmw/components/sceneutil/mwshadowtechnique.cpp:3094:5: note: Loop condition is false. Execution continues on line 3102
/home/elsid/dev/openmw/components/sceneutil/mwshadowtechnique.cpp:3126:21: note: Assuming 'i' is < 'numberOfShadowMapsPerLight'
    for (int i = 0; i < numberOfShadowMapsPerLight; ++i)
                    ^
/home/elsid/dev/openmw/components/sceneutil/mwshadowtechnique.cpp:3126:5: note: Loop condition is true.  Entering loop body
    for (int i = 0; i < numberOfShadowMapsPerLight; ++i)
    ^
/home/elsid/dev/openmw/components/sceneutil/mwshadowtechnique.cpp:3127:9: note: This constructor of an object of type 'DebugHUD' has not returned when the virtual method was called
        addAnotherShadowMap();
        ^
/home/elsid/dev/openmw/components/sceneutil/mwshadowtechnique.cpp:3127:9: note: Call to virtual function during construction
pull/556/head
elsid 5 years ago
parent bd149b909f
commit 2e1d8a5e55
No known key found for this signature in database
GPG Key ID: D27B8E8D10A2896B

@ -261,18 +261,18 @@ namespace SceneUtil {
float _shadowFadeStart = 0.0;
class DebugHUD : public osg::Referenced
class DebugHUD final : public osg::Referenced
{
public:
DebugHUD(int numberOfShadowMapsPerLight);
virtual void draw(osg::ref_ptr<osg::Texture2D> texture, unsigned int shadowMapNumber, const osg::Matrixd &matrix, osgUtil::CullVisitor& cv);
void draw(osg::ref_ptr<osg::Texture2D> texture, unsigned int shadowMapNumber, const osg::Matrixd &matrix, osgUtil::CullVisitor& cv);
virtual void releaseGLObjects(osg::State* state = 0) const;
void releaseGLObjects(osg::State* state = 0) const;
virtual void setFrustumVertices(osg::ref_ptr<osg::Vec3Array> vertices, unsigned int traversalNumber);
void setFrustumVertices(osg::ref_ptr<osg::Vec3Array> vertices, unsigned int traversalNumber);
protected:
virtual void addAnotherShadowMap();
void addAnotherShadowMap();
static const int sDebugTextureUnit = 0;

Loading…
Cancel
Save