From 48f240733d5410373026ed0dcce213c8037c00bf Mon Sep 17 00:00:00 2001 From: Auburn Date: Sun, 21 Apr 2024 20:24:50 +0100 Subject: [PATCH] Reduce metadata vector sizes --- src/FastNoise/Metadata.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/FastNoise/Metadata.cpp b/src/FastNoise/Metadata.cpp index 58f1707..606905b 100644 --- a/src/FastNoise/Metadata.cpp +++ b/src/FastNoise/Metadata.cpp @@ -461,7 +461,11 @@ template std::unique_ptr> CreateMetadataInstance( const char* className ) { auto* newMetadata = new MetadataT; - newMetadata->name = className; + newMetadata->name = className; + newMetadata->memberVariables.shrink_to_fit(); + newMetadata->memberNodeLookups.shrink_to_fit(); + newMetadata->memberHybrids.shrink_to_fit(); + newMetadata->groups.shrink_to_fit(); // Node must be in a group or it is not selectable in the UI assert( !newMetadata->groups.empty() );