mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-20 07:23:53 +00:00
Don't rely on virtual dispatch in constructor
apps/openmw/mwrender/animation.cpp:1841:60: warning: Call to virtual method 'ObjectAnimation::canBeHarvested' during construction bypasses virtual dispatch [clang-analyzer-optin.cplusplus.VirtualCall] if (ptr.getRefData().getCustomData() != nullptr && canBeHarvested()) ^~~~~~~~~~~~~~~~ apps/openmw/mwrender/bulletdebugdraw.cpp:33:5: warning: Call to virtual method 'DebugDrawer::setDebugMode' during construction bypasses virtual dispatch [clang-analyzer-optin.cplusplus.VirtualCall] setDebugMode(debugMode); ^~~~~~~~~~~~~~~~~~~~~~~ openmw/mwinput/controllermanager.cpp:63:17: warning: Call to virtual method 'ControllerManager::controllerAdded' during construction bypasses virtual dispatch [clang-analyzer-optin.cplusplus.VirtualCall] controllerAdded(fakeDeviceID, evt); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This commit is contained in:
parent
4ecee2e167
commit
bd7f56ddb4
3 changed files with 3 additions and 3 deletions
|
@ -60,7 +60,7 @@ namespace MWInput
|
||||||
SDL_ControllerDeviceEvent evt;
|
SDL_ControllerDeviceEvent evt;
|
||||||
evt.which = i;
|
evt.which = i;
|
||||||
static const int fakeDeviceID = 1;
|
static const int fakeDeviceID = 1;
|
||||||
controllerAdded(fakeDeviceID, evt);
|
ControllerManager::controllerAdded(fakeDeviceID, evt);
|
||||||
Log(Debug::Info) << "Detected game controller: " << SDL_GameControllerNameForIndex(i);
|
Log(Debug::Info) << "Detected game controller: " << SDL_GameControllerNameForIndex(i);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -1838,7 +1838,7 @@ namespace MWRender
|
||||||
mObjectRoot->accept(visitor);
|
mObjectRoot->accept(visitor);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ptr.getRefData().getCustomData() != nullptr && canBeHarvested())
|
if (ptr.getRefData().getCustomData() != nullptr && ObjectAnimation::canBeHarvested())
|
||||||
{
|
{
|
||||||
const MWWorld::ContainerStore& store = ptr.getClass().getContainerStore(ptr);
|
const MWWorld::ContainerStore& store = ptr.getClass().getContainerStore(ptr);
|
||||||
if (!store.hasVisibleItems())
|
if (!store.hasVisibleItems())
|
||||||
|
|
|
@ -30,7 +30,7 @@ DebugDrawer::DebugDrawer(osg::ref_ptr<osg::Group> parentNode, btCollisionWorld *
|
||||||
: mParentNode(parentNode),
|
: mParentNode(parentNode),
|
||||||
mWorld(world)
|
mWorld(world)
|
||||||
{
|
{
|
||||||
setDebugMode(debugMode);
|
DebugDrawer::setDebugMode(debugMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DebugDrawer::createGeometry()
|
void DebugDrawer::createGeometry()
|
||||||
|
|
Loading…
Reference in a new issue