forked from mirror/openmw-tes3mp
Fix some defects reported by Coverity CI
This commit is contained in:
parent
89512af808
commit
b0431833a1
11 changed files with 16 additions and 14 deletions
|
@ -1,6 +1,6 @@
|
|||
#include "messages.hpp"
|
||||
|
||||
CSMDoc::Message::Message() {}
|
||||
CSMDoc::Message::Message() : mSeverity(Severity_Default){}
|
||||
|
||||
CSMDoc::Message::Message (const CSMWorld::UniversalId& id, const std::string& message,
|
||||
const std::string& hint, Severity severity)
|
||||
|
|
|
@ -39,9 +39,6 @@ namespace CSMDoc
|
|||
{
|
||||
public:
|
||||
|
||||
// \deprecated Use CSMDoc::Message directly instead.
|
||||
typedef CSMDoc::Message Message;
|
||||
|
||||
typedef std::vector<Message> Collection;
|
||||
|
||||
typedef Collection::const_iterator Iterator;
|
||||
|
|
|
@ -2,7 +2,9 @@
|
|||
|
||||
#include "operation.hpp"
|
||||
|
||||
CSMDoc::OperationHolder::OperationHolder (Operation *operation) : mRunning (false)
|
||||
CSMDoc::OperationHolder::OperationHolder (Operation *operation)
|
||||
: mOperation(NULL)
|
||||
, mRunning (false)
|
||||
{
|
||||
if (operation)
|
||||
setOperation (operation);
|
||||
|
|
|
@ -182,7 +182,7 @@ int CSMTools::ReportModel::countErrors() const
|
|||
{
|
||||
int count = 0;
|
||||
|
||||
for (std::vector<CSMDoc::Messages::Message>::const_iterator iter (mRows.begin());
|
||||
for (std::vector<CSMDoc::Message>::const_iterator iter (mRows.begin());
|
||||
iter!=mRows.end(); ++iter)
|
||||
if (iter->mSeverity==CSMDoc::Message::Severity_Error ||
|
||||
iter->mSeverity==CSMDoc::Message::Severity_SeriousError)
|
||||
|
|
|
@ -16,7 +16,7 @@ namespace CSMTools
|
|||
{
|
||||
Q_OBJECT
|
||||
|
||||
std::vector<CSMDoc::Messages::Message> mRows;
|
||||
std::vector<CSMDoc::Message> mRows;
|
||||
|
||||
// Fixed columns
|
||||
enum Columns
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
CSMWorld::ModifyCommand::ModifyCommand (QAbstractItemModel& model, const QModelIndex& index,
|
||||
const QVariant& new_, QUndoCommand* parent)
|
||||
: QUndoCommand (parent), mModel (&model), mIndex (index), mNew (new_), mHasRecordState(false)
|
||||
: QUndoCommand (parent), mModel (&model), mIndex (index), mNew (new_), mHasRecordState(false), mOldRecordState(CSMWorld::RecordBase::State_BaseOnly)
|
||||
{
|
||||
if (QAbstractProxyModel *proxy = dynamic_cast<QAbstractProxyModel *> (&model))
|
||||
{
|
||||
|
|
|
@ -33,8 +33,9 @@
|
|||
|
||||
CSVRender::WorldspaceWidget::WorldspaceWidget (CSMDoc::Document& document, QWidget* parent)
|
||||
: SceneWidget (document.getData().getResourceSystem(), parent), mSceneElements(0), mRun(0), mDocument(document),
|
||||
mInteractionMask (0), mEditMode (0), mLocked (false), mDragging (false),
|
||||
mToolTipPos (-1, -1)
|
||||
mInteractionMask (0), mEditMode (0), mLocked (false), mDragging (false), mDragX(0), mDragY(0), mDragFactor(0),
|
||||
mDragWheelFactor(0), mDragShiftFactor(0),
|
||||
mToolTipPos (-1, -1), mShowToolTips(false), mToolTipDelay(0)
|
||||
{
|
||||
setAcceptDrops(true);
|
||||
|
||||
|
|
|
@ -231,7 +231,7 @@ void CSVWorld::Table::mouseDoubleClickEvent (QMouseEvent *event)
|
|||
CSVWorld::Table::Table (const CSMWorld::UniversalId& id,
|
||||
bool createAndDelete, bool sorting, CSMDoc::Document& document)
|
||||
: DragRecordTable(document), mCreateAction (0),
|
||||
mCloneAction(0),mRecordStatusDisplay (0)
|
||||
mCloneAction(0), mRecordStatusDisplay (0), mJumpToAddedRecord(false), mUnselectAfterJump(false)
|
||||
{
|
||||
mModel = &dynamic_cast<CSMWorld::IdTableBase&> (*mDocument.getData().getTableModel (id));
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ CSVWorld::TableBottomBox::TableBottomBox (const CreatorFactoryBase& creatorFacto
|
|||
CSMDoc::Document& document,
|
||||
const CSMWorld::UniversalId& id,
|
||||
QWidget *parent)
|
||||
: QWidget (parent), mShowStatusBar (false), mEditMode(EditMode_None), mHasPosition(false)
|
||||
: QWidget (parent), mShowStatusBar (false), mEditMode(EditMode_None), mHasPosition(false), mRow(0), mColumn(0)
|
||||
{
|
||||
for (int i=0; i<4; ++i)
|
||||
mStatusCount[i] = 0;
|
||||
|
|
|
@ -1556,7 +1556,7 @@ namespace MWMechanics
|
|||
(target == getPlayer() &&
|
||||
MWBase::Environment::get().getWorld()->getGlobalInt("pcknownwerewolf")))
|
||||
{
|
||||
const ESM::GameSetting * iWerewolfFightMod = MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>().search("iWerewolfFightMod");
|
||||
const ESM::GameSetting * iWerewolfFightMod = MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>().find("iWerewolfFightMod");
|
||||
fight += iWerewolfFightMod->getInt();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -433,7 +433,7 @@ namespace MWWorld
|
|||
// Werewolf (BM)
|
||||
gmst["fWereWolfRunMult"] = ESM::Variant(1.f);
|
||||
gmst["fWereWolfSilverWeaponDamageMult"] = ESM::Variant(1.f);
|
||||
|
||||
gmst["iWerewolfFightMod"] = ESM::Variant(1);
|
||||
|
||||
std::map<std::string, ESM::Variant> globals;
|
||||
// vanilla Morrowind does not define dayspassed.
|
||||
|
@ -1745,6 +1745,8 @@ namespace MWWorld
|
|||
{
|
||||
cellid.mWorldspace = ref.mRef.getDestCell();
|
||||
cellid.mPaged = false;
|
||||
cellid.mIndex.mX = 0;
|
||||
cellid.mIndex.mY = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue