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/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)
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue