CResourceStore: Use in-class initializers where applicable
This commit is contained in:
parent
7da16efe9d
commit
137b2395c9
|
@ -20,9 +20,6 @@ CResourceStore *gpEditorStore = nullptr;
|
||||||
|
|
||||||
// Constructor for editor store
|
// Constructor for editor store
|
||||||
CResourceStore::CResourceStore(const TString& rkDatabasePath)
|
CResourceStore::CResourceStore(const TString& rkDatabasePath)
|
||||||
: mpProj(nullptr)
|
|
||||||
, mGame(EGame::Prime)
|
|
||||||
, mDatabaseCacheDirty(false)
|
|
||||||
{
|
{
|
||||||
mpDatabaseRoot = new CVirtualDirectory(this);
|
mpDatabaseRoot = new CVirtualDirectory(this);
|
||||||
mDatabasePath = FileUtil::MakeAbsolute(rkDatabasePath.GetFileDirectory());
|
mDatabasePath = FileUtil::MakeAbsolute(rkDatabasePath.GetFileDirectory());
|
||||||
|
@ -32,10 +29,7 @@ CResourceStore::CResourceStore(const TString& rkDatabasePath)
|
||||||
|
|
||||||
// Main constructor for game projects and game exporter
|
// Main constructor for game projects and game exporter
|
||||||
CResourceStore::CResourceStore(CGameProject *pProject)
|
CResourceStore::CResourceStore(CGameProject *pProject)
|
||||||
: mpProj(nullptr)
|
: mGame(EGame::Invalid)
|
||||||
, mGame(EGame::Invalid)
|
|
||||||
, mpDatabaseRoot(nullptr)
|
|
||||||
, mDatabaseCacheDirty(false)
|
|
||||||
{
|
{
|
||||||
SetProject(pProject);
|
SetProject(pProject);
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,16 +27,16 @@ class CResourceStore
|
||||||
{
|
{
|
||||||
friend class CResourceIterator;
|
friend class CResourceIterator;
|
||||||
|
|
||||||
CGameProject *mpProj;
|
CGameProject *mpProj = nullptr;
|
||||||
EGame mGame;
|
EGame mGame{EGame::Prime};
|
||||||
CVirtualDirectory *mpDatabaseRoot;
|
CVirtualDirectory *mpDatabaseRoot = nullptr;
|
||||||
std::map<CAssetID, CResourceEntry*> mResourceEntries;
|
std::map<CAssetID, CResourceEntry*> mResourceEntries;
|
||||||
std::map<CAssetID, CResourceEntry*> mLoadedResources;
|
std::map<CAssetID, CResourceEntry*> mLoadedResources;
|
||||||
bool mDatabaseCacheDirty;
|
bool mDatabaseCacheDirty = false;
|
||||||
|
|
||||||
// Directory paths
|
// Directory paths
|
||||||
TString mDatabasePath;
|
TString mDatabasePath;
|
||||||
bool mDatabasePathExists;
|
bool mDatabasePathExists = false;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit CResourceStore(const TString& rkDatabasePath);
|
explicit CResourceStore(const TString& rkDatabasePath);
|
||||||
|
|
Loading…
Reference in New Issue