Skip to content

Commit

Permalink
Reduce metadata vector sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
Auburn committed Apr 21, 2024
1 parent 6410274 commit 48f2407
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/FastNoise/Metadata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,11 @@ template<typename T>
std::unique_ptr<const MetadataT<T>> CreateMetadataInstance( const char* className )
{
auto* newMetadata = new MetadataT<T>;
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() );
Expand Down

0 comments on commit 48f2407

Please sign in to comment.