diff --git a/src/EnergyPlus/ExtendedHI.cc b/src/EnergyPlus/ExtendedHI.cc index 5aea944b603..d46b53a86c7 100644 --- a/src/EnergyPlus/ExtendedHI.cc +++ b/src/EnergyPlus/ExtendedHI.cc @@ -480,7 +480,8 @@ namespace ExtendedHI { // RH: relative humidity in range of 0.0 to 1.0 // The function computes the extended heat index, in Kelvinn - auto const HVACSystemRootSolverBackup = state.dataRootFinder->HVACSystemRootFinding.HVACSystemRootSolver; + auto const &HVACSystemRootSolver = state.dataRootFinder->HVACSystemRootFinding.HVACSystemRootSolver; + auto const HVACSystemRootSolverBackup = HVACSystemRootSolver; state.dataRootFinder->HVACSystemRootFinding.HVACSystemRootSolver = HVACSystemRootSolverAlgorithm::Bisection; auto eqvars = find_eqvar(state, Ta, RH); int eqvar_name = std::get<0>(eqvars);