mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-07 12:54:00 +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
@ -60,7 +60,7 @@ namespace MWInput
|
||||
SDL_ControllerDeviceEvent evt;
|
||||
evt.which = i;
|
||||
static const int fakeDeviceID = 1;
|
||||
controllerAdded(fakeDeviceID, evt);
|
||||
ControllerManager::controllerAdded(fakeDeviceID, evt);
|
||||
Log(Debug::Info) << "Detected game controller: " << SDL_GameControllerNameForIndex(i);
|
||||
}
|
||||
else
|
||||
|
@ -1838,7 +1838,7 @@ namespace MWRender
|
||||
mObjectRoot->accept(visitor);
|
||||
}
|
||||
|
||||
if (ptr.getRefData().getCustomData() != nullptr && canBeHarvested())
|
||||
if (ptr.getRefData().getCustomData() != nullptr && ObjectAnimation::canBeHarvested())
|
||||
{
|
||||
const MWWorld::ContainerStore& store = ptr.getClass().getContainerStore(ptr);
|
||||
if (!store.hasVisibleItems())
|
||||
|
@ -30,7 +30,7 @@ DebugDrawer::DebugDrawer(osg::ref_ptr<osg::Group> parentNode, btCollisionWorld *
|
||||
: mParentNode(parentNode),
|
||||
mWorld(world)
|
||||
{
|
||||
setDebugMode(debugMode);
|
||||
DebugDrawer::setDebugMode(debugMode);
|
||||
}
|
||||
|
||||
void DebugDrawer::createGeometry()
|
||||
|
Loading…
Reference in New Issue
Block a user