CScriptLoader: Make use of in-class initializers

Same behavior, less code.
This commit is contained in:
Lioncash 2020-06-19 20:23:03 -04:00
parent 7629f15f40
commit 888ceb55d5
2 changed files with 7 additions and 12 deletions

View File

@ -7,17 +7,12 @@
#include "Core/Resource/Script/Property/CEnumProperty.h"
#include "Core/Resource/Script/Property/CFlagsProperty.h"
#include <Common/Log.h>
#include <iostream>
#include <sstream>
// Whether to ensure the values of enum/flag properties are valid
#define VALIDATE_PROPERTY_VALUES 1
CScriptLoader::CScriptLoader()
: mpObj(nullptr)
, mpCurrentData(nullptr)
{
}
CScriptLoader::CScriptLoader() = default;
void CScriptLoader::ReadProperty(IProperty *pProp, uint32 Size, IInputStream& rSCLY)
{

View File

@ -10,14 +10,14 @@
class CScriptLoader
{
EGame mVersion;
CScriptObject* mpObj;
CScriptLayer* mpLayer;
CGameArea* mpArea;
CGameTemplate *mpGameTemplate;
EGame mVersion{};
CScriptObject* mpObj = nullptr;
CScriptLayer* mpLayer = nullptr;
CGameArea* mpArea = nullptr;
CGameTemplate *mpGameTemplate = nullptr;
// Current data pointer
void* mpCurrentData;
void* mpCurrentData = nullptr;
CScriptLoader();
void ReadProperty(IProperty* pProp, uint32 Size, IInputStream& rSCLY);