CResTypeInfo: Make use of in-class initializers where applicable

Same behavior, less code.
This commit is contained in:
Lioncash 2020-06-18 06:19:06 -04:00
parent b77f52bb0e
commit a612751cb0
2 changed files with 3 additions and 6 deletions

View File

@ -8,9 +8,6 @@ CResTypeInfo::CResTypeInfo(EResourceType Type, const TString& rkTypeName, const
: mType(Type) : mType(Type)
, mTypeName(rkTypeName) , mTypeName(rkTypeName)
, mRetroExtension(rkRetroExtension) , mRetroExtension(rkRetroExtension)
, mCanBeSerialized(false)
, mCanHaveDependencies(true)
, mCanBeCreated(false)
{ {
#if !PUBLIC_RELEASE #if !PUBLIC_RELEASE
ASSERT(smTypeMap.find(Type) == smTypeMap.end()); ASSERT(smTypeMap.find(Type) == smTypeMap.end());

View File

@ -21,9 +21,9 @@ class CResTypeInfo
TString mTypeName; TString mTypeName;
std::vector<SGameExtension> mCookedExtensions; std::vector<SGameExtension> mCookedExtensions;
TString mRetroExtension; // File extension in Retro's directory tree. We don't use it directly but it is needed for generating asset ID hashes TString mRetroExtension; // File extension in Retro's directory tree. We don't use it directly but it is needed for generating asset ID hashes
bool mCanBeSerialized; bool mCanBeSerialized = false;
bool mCanHaveDependencies; bool mCanHaveDependencies = true;
bool mCanBeCreated; bool mCanBeCreated = false;
static std::unordered_map<EResourceType, std::unique_ptr<CResTypeInfo>> smTypeMap; static std::unordered_map<EResourceType, std::unique_ptr<CResTypeInfo>> smTypeMap;