diff --git a/include/micm/solver/solver.hpp b/include/micm/solver/solver.hpp index 34b5f61a4..f9510d2d7 100644 --- a/include/micm/solver/solver.hpp +++ b/include/micm/solver/solver.hpp @@ -40,13 +40,13 @@ namespace micm Solver& operator=(const Solver&) = delete; Solver(Solver&& other) - : number_of_grid_cells_(other.number_of_grid_cells_), + : solver_(std::move(other.solver_)), + processes_(std::move(other.processes_)), + number_of_grid_cells_(other.number_of_grid_cells_), number_of_species_(other.number_of_species_), number_of_reactions_(other.number_of_reactions_), state_parameters_(other.state_parameters_) { - std::swap(this->solver_, other.solver_); - std::swap(this->processes_, other.processes_); } Solver& operator=(Solver&& other) { @@ -55,7 +55,7 @@ namespace micm number_of_species_ = other.number_of_species_; number_of_reactions_ = other.number_of_reactions_; state_parameters_ = other.state_parameters_; - std::swap(this->solver_, other.processes_); + std::swap(this->processes_, other.processes_); return *this; }