From b07a6afa91ecf85dcaca86bb62d4383b6a06916a Mon Sep 17 00:00:00 2001 From: elsid Date: Sun, 17 Nov 2019 17:01:30 +0100 Subject: [PATCH] Avoid virtual call in GraphicsWindowSDL2 ctor /home/elsid/dev/openmw/components/sdlutil/sdlgraphicswindow.cpp:23:8: warning: Call to virtual function during construction [clang-analyzer-optin.cplusplus.VirtualCall] if(valid()) ^ /home/elsid/dev/openmw/components/sdlutil/sdlgraphicswindow.cpp:23:8: note: This constructor of an object of type 'GraphicsWindowSDL2' has not returned when the virtual method was called /home/elsid/dev/openmw/components/sdlutil/sdlgraphicswindow.cpp:23:8: note: Call to virtual function during construction --- components/sdlutil/sdlgraphicswindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/sdlutil/sdlgraphicswindow.cpp b/components/sdlutil/sdlgraphicswindow.cpp index ad8454b25c..cd5e80c31b 100644 --- a/components/sdlutil/sdlgraphicswindow.cpp +++ b/components/sdlutil/sdlgraphicswindow.cpp @@ -20,7 +20,7 @@ GraphicsWindowSDL2::GraphicsWindowSDL2(osg::GraphicsContext::Traits *traits) _traits = traits; init(); - if(valid()) + if(GraphicsWindowSDL2::valid()) { setState(new osg::State); getState()->setGraphicsContext(this);