silenced a coverity warning

This commit is contained in:
Marc Zinnschlag 2015-01-15 12:13:53 +01:00
parent 7b8e6f9dda
commit 706df3f881
2 changed files with 13 additions and 10 deletions

View File

@ -75,7 +75,8 @@ CS::Editor::~Editor ()
mPidFile.close(); mPidFile.close();
if(mServer && boost::filesystem::exists(mPid)) if(mServer && boost::filesystem::exists(mPid))
remove(mPid.string().c_str()); // ignore any error static_cast<void> ( // silence coverity warning
remove(mPid.string().c_str())); // ignore any error
// cleanup global resources used by OEngine // cleanup global resources used by OEngine
delete OEngine::Physic::BulletShapeManager::getSingletonPtr(); delete OEngine::Physic::BulletShapeManager::getSingletonPtr();

View File

@ -138,7 +138,8 @@ bool CSVWorld::TableSubView::eventFilter (QObject* object, QEvent* event)
{ {
if (event->type() == QEvent::Drop) if (event->type() == QEvent::Drop)
{ {
QDropEvent* drop = dynamic_cast<QDropEvent*>(event); if (QDropEvent* drop = dynamic_cast<QDropEvent*>(event))
{
const CSMWorld::TableMimeData* data = dynamic_cast<const CSMWorld::TableMimeData*>(drop->mimeData()); const CSMWorld::TableMimeData* data = dynamic_cast<const CSMWorld::TableMimeData*>(drop->mimeData());
if (!data) // May happen when non-records (e.g. plain text) are dragged and dropped if (!data) // May happen when non-records (e.g. plain text) are dragged and dropped
return false; return false;
@ -150,6 +151,7 @@ bool CSVWorld::TableSubView::eventFilter (QObject* object, QEvent* event)
} }
return handled; return handled;
} }
}
return false; return false;
} }