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
|
||||
CResourceStore::CResourceStore(const TString& rkDatabasePath)
|
||||
: mpProj(nullptr)
|
||||
, mGame(EGame::Prime)
|
||||
, mDatabaseCacheDirty(false)
|
||||
{
|
||||
mpDatabaseRoot = new CVirtualDirectory(this);
|
||||
mDatabasePath = FileUtil::MakeAbsolute(rkDatabasePath.GetFileDirectory());
|
||||
|
@ -32,10 +29,7 @@ CResourceStore::CResourceStore(const TString& rkDatabasePath)
|
|||
|
||||
// Main constructor for game projects and game exporter
|
||||
CResourceStore::CResourceStore(CGameProject *pProject)
|
||||
: mpProj(nullptr)
|
||||
, mGame(EGame::Invalid)
|
||||
, mpDatabaseRoot(nullptr)
|
||||
, mDatabaseCacheDirty(false)
|
||||
: mGame(EGame::Invalid)
|
||||
{
|
||||
SetProject(pProject);
|
||||
}
|
||||
|
|
|
@ -27,16 +27,16 @@ class CResourceStore
|
|||
{
|
||||
friend class CResourceIterator;
|
||||
|
||||
CGameProject *mpProj;
|
||||
EGame mGame;
|
||||
CVirtualDirectory *mpDatabaseRoot;
|
||||
CGameProject *mpProj = nullptr;
|
||||
EGame mGame{EGame::Prime};
|
||||
CVirtualDirectory *mpDatabaseRoot = nullptr;
|
||||
std::map<CAssetID, CResourceEntry*> mResourceEntries;
|
||||
std::map<CAssetID, CResourceEntry*> mLoadedResources;
|
||||
bool mDatabaseCacheDirty;
|
||||
bool mDatabaseCacheDirty = false;
|
||||
|
||||
// Directory paths
|
||||
TString mDatabasePath;
|
||||
bool mDatabasePathExists;
|
||||
bool mDatabasePathExists = false;
|
||||
|
||||
public:
|
||||
explicit CResourceStore(const TString& rkDatabasePath);
|
||||
|
|
Loading…
Reference in New Issue