SImplify capacity presetting for Dictionary to handle memory slack scale internally as suers care about items count only

This commit is contained in:
Wojtek Figat
2025-01-16 17:42:01 +01:00
parent 6111f67e33
commit 1497acef58
9 changed files with 26 additions and 25 deletions

View File

@@ -931,7 +931,7 @@ void ManagedBinaryModule::OnLoaded(MAssembly* assembly)
const auto& classes = assembly->GetClasses();
// Cache managed types information
ClassToTypeIndex.EnsureCapacity(Types.Count() * 4);
ClassToTypeIndex.EnsureCapacity(Types.Count());
for (int32 typeIndex = 0; typeIndex < Types.Count(); typeIndex++)
{
ScriptingType& type = Types[typeIndex];