mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-16 18:59:57 +00:00
Fix uninitialized variables
This commit is contained in:
parent
b96929f3fc
commit
124a33d8a3
9 changed files with 66 additions and 11 deletions
|
@ -56,7 +56,9 @@ void CSMWorld::PotionRefIdAdapter::setData (const RefIdColumn *column, RefIdData
|
|||
|
||||
|
||||
CSMWorld::IngredientColumns::IngredientColumns (const InventoryColumns& columns)
|
||||
: InventoryColumns (columns) {}
|
||||
: InventoryColumns (columns)
|
||||
, mEffects(nullptr)
|
||||
{}
|
||||
|
||||
CSMWorld::IngredientRefIdAdapter::IngredientRefIdAdapter (const IngredientColumns& columns)
|
||||
: InventoryRefIdAdapter<ESM::Ingredient> (UniversalId::Type_Ingredient, columns),
|
||||
|
@ -585,7 +587,13 @@ void CSMWorld::DoorRefIdAdapter::setData (const RefIdColumn *column, RefIdData&
|
|||
}
|
||||
|
||||
CSMWorld::LightColumns::LightColumns (const InventoryColumns& columns)
|
||||
: InventoryColumns (columns) {}
|
||||
: InventoryColumns (columns)
|
||||
, mTime(nullptr)
|
||||
, mRadius(nullptr)
|
||||
, mColor(nullptr)
|
||||
, mSound(nullptr)
|
||||
, mEmitterType(nullptr)
|
||||
{}
|
||||
|
||||
CSMWorld::LightRefIdAdapter::LightRefIdAdapter (const LightColumns& columns)
|
||||
: InventoryRefIdAdapter<ESM::Light> (UniversalId::Type_Light, columns), mColumns (columns)
|
||||
|
@ -1454,7 +1462,15 @@ int CSMWorld::CreatureMiscRefIdAdapter::getNestedRowsCount(const RefIdColumn *co
|
|||
}
|
||||
|
||||
CSMWorld::WeaponColumns::WeaponColumns (const EnchantableColumns& columns)
|
||||
: EnchantableColumns (columns) {}
|
||||
: EnchantableColumns (columns)
|
||||
, mType(nullptr)
|
||||
, mHealth(nullptr)
|
||||
, mSpeed(nullptr)
|
||||
, mReach(nullptr)
|
||||
, mChop{nullptr}
|
||||
, mSlash{nullptr}
|
||||
, mThrust{nullptr}
|
||||
{}
|
||||
|
||||
CSMWorld::WeaponRefIdAdapter::WeaponRefIdAdapter (const WeaponColumns& columns)
|
||||
: EnchantableRefIdAdapter<ESM::Weapon> (UniversalId::Type_Weapon, columns), mColumns (columns)
|
||||
|
|
|
@ -178,7 +178,11 @@ namespace CSMWorld
|
|||
const RefIdColumn *mName;
|
||||
const RefIdColumn *mScript;
|
||||
|
||||
NameColumns (const ModelColumns& base) : ModelColumns (base) {}
|
||||
NameColumns (const ModelColumns& base)
|
||||
: ModelColumns (base)
|
||||
, mName(nullptr)
|
||||
, mScript(nullptr)
|
||||
{}
|
||||
};
|
||||
|
||||
/// \brief Adapter for IDs with names (all but levelled lists and statics)
|
||||
|
@ -247,7 +251,12 @@ namespace CSMWorld
|
|||
const RefIdColumn *mWeight;
|
||||
const RefIdColumn *mValue;
|
||||
|
||||
InventoryColumns (const NameColumns& base) : NameColumns (base) {}
|
||||
InventoryColumns (const NameColumns& base)
|
||||
: NameColumns (base)
|
||||
, mIcon(nullptr)
|
||||
, mWeight(nullptr)
|
||||
, mValue(nullptr)
|
||||
{}
|
||||
};
|
||||
|
||||
/// \brief Adapter for IDs that can go into an inventory
|
||||
|
@ -405,7 +414,11 @@ namespace CSMWorld
|
|||
const RefIdColumn *mEnchantment;
|
||||
const RefIdColumn *mEnchantmentPoints;
|
||||
|
||||
EnchantableColumns (const InventoryColumns& base) : InventoryColumns (base) {}
|
||||
EnchantableColumns (const InventoryColumns& base)
|
||||
: InventoryColumns (base)
|
||||
, mEnchantment(nullptr)
|
||||
, mEnchantmentPoints(nullptr)
|
||||
{}
|
||||
};
|
||||
|
||||
/// \brief Adapter for enchantable IDs
|
||||
|
@ -474,7 +487,11 @@ namespace CSMWorld
|
|||
const RefIdColumn *mQuality;
|
||||
const RefIdColumn *mUses;
|
||||
|
||||
ToolColumns (const InventoryColumns& base) : InventoryColumns (base) {}
|
||||
ToolColumns (const InventoryColumns& base)
|
||||
: InventoryColumns (base)
|
||||
, mQuality(nullptr)
|
||||
, mUses(nullptr)
|
||||
{}
|
||||
};
|
||||
|
||||
/// \brief Adapter for tools with limited uses IDs (lockpick, repair, probes)
|
||||
|
@ -549,7 +566,17 @@ namespace CSMWorld
|
|||
const RefIdColumn *mAiPackages;
|
||||
std::map<const RefIdColumn *, unsigned int> mServices;
|
||||
|
||||
ActorColumns (const NameColumns& base) : NameColumns (base) {}
|
||||
ActorColumns (const NameColumns& base)
|
||||
: NameColumns (base)
|
||||
, mHello(nullptr)
|
||||
, mFlee(nullptr)
|
||||
, mFight(nullptr)
|
||||
, mAlarm(nullptr)
|
||||
, mInventory(nullptr)
|
||||
, mSpells(nullptr)
|
||||
, mDestinations(nullptr)
|
||||
, mAiPackages(nullptr)
|
||||
{}
|
||||
};
|
||||
|
||||
/// \brief Adapter for actor IDs (handles common AI functionality)
|
||||
|
@ -2054,7 +2081,11 @@ namespace CSMWorld
|
|||
const RefIdColumn *mLevList;
|
||||
const RefIdColumn *mNestedListLevList;
|
||||
|
||||
LevListColumns (const BaseColumns& base) : BaseColumns (base) {}
|
||||
LevListColumns (const BaseColumns& base)
|
||||
: BaseColumns (base)
|
||||
, mLevList(nullptr)
|
||||
, mNestedListLevList(nullptr)
|
||||
{}
|
||||
};
|
||||
|
||||
template<typename RecordT>
|
||||
|
|
|
@ -815,6 +815,7 @@ namespace MWRender
|
|||
RenderingManager::RayResult result;
|
||||
result.mHit = false;
|
||||
result.mHitRefnum.mContentFile = -1;
|
||||
result.mHitRefnum.mIndex = -1;
|
||||
result.mRatio = 0;
|
||||
if (intersector->containsIntersections())
|
||||
{
|
||||
|
|
|
@ -42,6 +42,7 @@ void ESM::Header::load (ESMReader &esm)
|
|||
MasterData m;
|
||||
m.name = esm.getHString();
|
||||
m.size = esm.getHNLong ("DATA");
|
||||
m.index = -1;
|
||||
mMaster.push_back (m);
|
||||
}
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ namespace Misc
|
|||
explicit FrameRateLimiter(std::chrono::duration<Rep, Ratio> maxFrameDuration,
|
||||
std::chrono::steady_clock::time_point now = std::chrono::steady_clock::now())
|
||||
: mMaxFrameDuration(std::chrono::duration_cast<std::chrono::steady_clock::duration>(maxFrameDuration))
|
||||
, mLastFrameDuration(0)
|
||||
, mLastMeasurement(now)
|
||||
{}
|
||||
|
||||
|
|
|
@ -226,6 +226,7 @@ namespace Resource
|
|||
, mAutoUseNormalMaps(false)
|
||||
, mAutoUseSpecularMaps(false)
|
||||
, mApplyLightingToEnvMaps(false)
|
||||
, mConvertAlphaTestToAlphaToCoverage(false)
|
||||
, mInstanceCache(new MultiObjectCache)
|
||||
, mSharedStateManager(new SharedStateManager)
|
||||
, mImageManager(imageManager)
|
||||
|
|
|
@ -375,6 +375,7 @@ InputWrapper::InputWrapper(SDL_Window* window, osg::ref_ptr<osgViewer::Viewer> v
|
|||
pack_evt.y = mMouseY = evt.motion.y;
|
||||
pack_evt.xrel = evt.motion.xrel;
|
||||
pack_evt.yrel = evt.motion.yrel;
|
||||
pack_evt.type = SDL_MOUSEMOTION;
|
||||
if (mFirstMouseMove)
|
||||
{
|
||||
// first event should be treated as non-relative, since there's no point of reference
|
||||
|
@ -387,6 +388,7 @@ InputWrapper::InputWrapper(SDL_Window* window, osg::ref_ptr<osgViewer::Viewer> v
|
|||
{
|
||||
mMouseZ += pack_evt.zrel = (evt.wheel.y * 120);
|
||||
pack_evt.z = mMouseZ;
|
||||
pack_evt.type = SDL_MOUSEWHEEL;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -50,6 +50,7 @@ namespace Shader
|
|||
, mAutoUseNormalMaps(false)
|
||||
, mAutoUseSpecularMaps(false)
|
||||
, mApplyLightingToEnvMaps(false)
|
||||
, mConvertAlphaTestToAlphaToCoverage(false)
|
||||
, mTranslucentFramebuffer(false)
|
||||
, mShaderManager(shaderManager)
|
||||
, mImageManager(imageManager)
|
||||
|
|
5
extern/osg-ffmpeg-videoplayer/videostate.cpp
vendored
5
extern/osg-ffmpeg-videoplayer/videostate.cpp
vendored
|
@ -50,8 +50,9 @@ VideoState::VideoState()
|
|||
, av_sync_type(AV_SYNC_DEFAULT)
|
||||
, audio_st(nullptr)
|
||||
, video_st(nullptr), frame_last_pts(0.0)
|
||||
, video_clock(0.0), sws_context(nullptr), pictq_size(0)
|
||||
, pictq_rindex(0), pictq_windex(0)
|
||||
, video_clock(0.0), sws_context(nullptr)
|
||||
, sws_context_w(0), sws_context_h(0)
|
||||
, pictq_size(0), pictq_rindex(0), pictq_windex(0)
|
||||
, mSeekRequested(false)
|
||||
, mSeekPos(0)
|
||||
, mVideoEnded(false)
|
||||
|
|
Loading…
Reference in a new issue