CppCheck : Several fixes

Add missing initializers
Guard potential null pointer access
This commit is contained in:
Magne Sjaastad
2018-08-02 19:22:03 +02:00
parent 39c4319fa4
commit fe07b60392
21 changed files with 184 additions and 148 deletions

View File

@@ -30,22 +30,24 @@ class RigFemResultAddress
{
public:
RigFemResultAddress()
: resultPosType(RIG_NODAL)
, fieldName("")
, componentName("")
, timeLapseBaseFrameIdx(NO_TIME_LAPSE)
, refKLayerIndex(NO_COMPACTION)
{
resultPosType = RIG_NODAL;
fieldName = "";
componentName = "";
}
RigFemResultAddress(RigFemResultPosEnum resPosType,
const std::string& aFieldName,
const std::string& aComponentName,
int timeLapseBaseFrameIdx = NO_TIME_LAPSE,
int refKLayerIndex = NO_COMPACTION)
: resultPosType(resPosType),
fieldName(aFieldName),
componentName(aComponentName),
timeLapseBaseFrameIdx(timeLapseBaseFrameIdx),
refKLayerIndex(refKLayerIndex)
const std::string& aFieldName,
const std::string& aComponentName,
int timeLapseBaseFrameIdx = NO_TIME_LAPSE,
int refKLayerIndex = NO_COMPACTION)
: resultPosType(resPosType)
, fieldName(aFieldName)
, componentName(aComponentName)
, timeLapseBaseFrameIdx(timeLapseBaseFrameIdx)
, refKLayerIndex(refKLayerIndex)
{
}