CScriptLoader: Make use of in-class initializers
Same behavior, less code.
This commit is contained in:
parent
7629f15f40
commit
888ceb55d5
|
@ -7,17 +7,12 @@
|
||||||
#include "Core/Resource/Script/Property/CEnumProperty.h"
|
#include "Core/Resource/Script/Property/CEnumProperty.h"
|
||||||
#include "Core/Resource/Script/Property/CFlagsProperty.h"
|
#include "Core/Resource/Script/Property/CFlagsProperty.h"
|
||||||
#include <Common/Log.h>
|
#include <Common/Log.h>
|
||||||
#include <iostream>
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
// Whether to ensure the values of enum/flag properties are valid
|
// Whether to ensure the values of enum/flag properties are valid
|
||||||
#define VALIDATE_PROPERTY_VALUES 1
|
#define VALIDATE_PROPERTY_VALUES 1
|
||||||
|
|
||||||
CScriptLoader::CScriptLoader()
|
CScriptLoader::CScriptLoader() = default;
|
||||||
: mpObj(nullptr)
|
|
||||||
, mpCurrentData(nullptr)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void CScriptLoader::ReadProperty(IProperty *pProp, uint32 Size, IInputStream& rSCLY)
|
void CScriptLoader::ReadProperty(IProperty *pProp, uint32 Size, IInputStream& rSCLY)
|
||||||
{
|
{
|
||||||
|
|
|
@ -10,14 +10,14 @@
|
||||||
|
|
||||||
class CScriptLoader
|
class CScriptLoader
|
||||||
{
|
{
|
||||||
EGame mVersion;
|
EGame mVersion{};
|
||||||
CScriptObject* mpObj;
|
CScriptObject* mpObj = nullptr;
|
||||||
CScriptLayer* mpLayer;
|
CScriptLayer* mpLayer = nullptr;
|
||||||
CGameArea* mpArea;
|
CGameArea* mpArea = nullptr;
|
||||||
CGameTemplate *mpGameTemplate;
|
CGameTemplate *mpGameTemplate = nullptr;
|
||||||
|
|
||||||
// Current data pointer
|
// Current data pointer
|
||||||
void* mpCurrentData;
|
void* mpCurrentData = nullptr;
|
||||||
|
|
||||||
CScriptLoader();
|
CScriptLoader();
|
||||||
void ReadProperty(IProperty* pProp, uint32 Size, IInputStream& rSCLY);
|
void ReadProperty(IProperty* pProp, uint32 Size, IInputStream& rSCLY);
|
||||||
|
|
Loading…
Reference in New Issue