1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-06-30 13:11:37 +00:00

Use initialization lists where possible

This commit is contained in:
jvoisin 2021-06-23 23:36:43 +02:00
parent df3a47187b
commit b2c170efa0
3 changed files with 9 additions and 17 deletions

View file

@ -48,12 +48,9 @@ namespace MWRender
float mScale;
std::string mModel;
GroundcoverEntry(const ESM::CellRef& ref, const std::string& model)
{
mPos = ref.mPos;
mScale = ref.mScale;
mModel = model;
}
GroundcoverEntry(const ESM::CellRef& ref, const std::string& model):
mPos(ref.mPos), mScale(ref.mScale), mModel(model)
{}
};
private:

View file

@ -48,11 +48,9 @@ namespace MWScript
Compiler::Locals mLocals;
std::set<std::string> mInactive;
CompiledScript(const std::vector<Interpreter::Type_Code>& code, const Compiler::Locals& locals)
{
mByteCode = code;
mLocals = locals;
}
CompiledScript(const std::vector<Interpreter::Type_Code>& code, const Compiler::Locals& locals):
mByteCode(code), mLocals(locals)
{}
};
typedef std::map<std::string, CompiledScript> ScriptCollection;

View file

@ -21,12 +21,9 @@ namespace ESM
struct SummonKey
{
SummonKey(int effectId, const std::string& sourceId, int index)
{
mEffectId = effectId;
mSourceId = sourceId;
mEffectIndex = index;
}
SummonKey(int effectId, const std::string& sourceId, int index):
mEffectId(effectId), mSourceId(sourceId), mEffectIndex(index)
{}
bool operator==(const SummonKey &other) const
{