Skip to content

initial_profiles: Use FieldFactory singleton#3270

Merged
bendudson merged 1 commit intonextfrom
initialprofiles_use_singleton
Feb 6, 2026
Merged

initial_profiles: Use FieldFactory singleton#3270
bendudson merged 1 commit intonextfrom
initialprofiles_use_singleton

Conversation

@bendudson
Copy link
Contributor

Rather than creating a new FieldFactory, use the singleton object. This allows users to register new generators and use them to intialise variables.

Rather than creating a new FieldFactory, use the singleton object.
This allows users to register new generators and use them to
intialise variables.
Copy link
Member

@ZedThree ZedThree left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feels obvious! Thanks @bendudson!

I guess this might plausibly cause issues with the unit tests -- but the simple solution is to take a pointer to a factory and use the singleton if it's nullptr. We'll see if that's necessary

@bendudson bendudson merged commit c267106 into next Feb 6, 2026
27 checks passed
@bendudson bendudson deleted the initialprofiles_use_singleton branch February 6, 2026 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants