fix(construction): removed std::optional arguments for weakRateInterpolator

Passing weak rate interpolator as an std::optional was resulting in use-after-free bugs due to std::optional making a copy of WeakRateInterpolator. This resulted in segfaults. Since we have the new construction semantics with flags this is no longer needed so the optional argument has been removed in favor of a simple const &
This commit is contained in:
2025-11-03 09:43:36 -05:00
parent 70ebe151ba
commit 0adc340767
3 changed files with 12 additions and 12 deletions

View File

@@ -105,7 +105,7 @@ namespace gridfire {
*/
reaction::ReactionSet build_nuclear_network(
const fourdst::composition::Composition &composition,
const std::optional<rates::weak::WeakRateInterpolator> &weakInterpolator,
const rates::weak::WeakRateInterpolator &weakInterpolator,
BuildDepthType maxLayers = NetworkBuildDepth::Full,
NetworkConstructionFlags ReactionTypes = NetworkConstructionFlags::DEFAULT
);