1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-23 00:28:08 +02:00

Made CTypeList threadsafe

This commit is contained in:
AlexVinS
2015-10-25 03:26:48 +03:00
parent 687a82886f
commit 0f9de1c560
2 changed files with 10 additions and 2 deletions

View File

@ -450,6 +450,7 @@ CTypeList::TypeInfoPtr CTypeList::registerType( const std::type_info *type )
ui16 CTypeList::getTypeID(const std::type_info * type) const
{
TSharedLock lock(mx);
auto i = typeInfos.find(type);
if(i != typeInfos.end())
return i->second->typeID;