mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-06 09:45:32 +00:00
Initialize ENAMstruct in SpellCreationDialog (Coverity)
This commit is contained in:
parent
08d8dd287c
commit
bb718f216d
1 changed files with 15 additions and 0 deletions
|
@ -36,6 +36,18 @@ namespace
|
||||||
return gmst.find(ESM::MagicEffect::effectIdToString (id1))->getString()
|
return gmst.find(ESM::MagicEffect::effectIdToString (id1))->getString()
|
||||||
< gmst.find(ESM::MagicEffect::effectIdToString (id2))->getString();
|
< gmst.find(ESM::MagicEffect::effectIdToString (id2))->getString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void init(ESM::ENAMstruct& effect)
|
||||||
|
{
|
||||||
|
effect.mArea = 0;
|
||||||
|
effect.mDuration = 0;
|
||||||
|
effect.mEffectID = -1;
|
||||||
|
effect.mMagnMax = 0;
|
||||||
|
effect.mMagnMin = 0;
|
||||||
|
effect.mRange = 0;
|
||||||
|
effect.mSkill = -1;
|
||||||
|
effect.mAttribute = -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace MWGui
|
namespace MWGui
|
||||||
|
@ -47,6 +59,9 @@ namespace MWGui
|
||||||
, mMagicEffect(NULL)
|
, mMagicEffect(NULL)
|
||||||
, mConstantEffect(false)
|
, mConstantEffect(false)
|
||||||
{
|
{
|
||||||
|
init(mEffect);
|
||||||
|
init(mOldEffect);
|
||||||
|
|
||||||
getWidget(mCancelButton, "CancelButton");
|
getWidget(mCancelButton, "CancelButton");
|
||||||
getWidget(mOkButton, "OkButton");
|
getWidget(mOkButton, "OkButton");
|
||||||
getWidget(mDeleteButton, "DeleteButton");
|
getWidget(mDeleteButton, "DeleteButton");
|
||||||
|
|
Loading…
Reference in a new issue