From f763192a32b9940bd4d9779e6089581582e33bab Mon Sep 17 00:00:00 2001 From: Markus Blatt Date: Thu, 20 Nov 2014 13:54:17 +0100 Subject: [PATCH] [cleanup] Removes a superfluous if-check of the well state. There were to identical if statements and the second one was followed by an else branch. While in this case (if statement just throws) it is not a bug, this commit cleans up one of the if statements. --- opm/core/wells/WellsManager.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/opm/core/wells/WellsManager.cpp b/opm/core/wells/WellsManager.cpp index 1dd3fb564..2403f373b 100644 --- a/opm/core/wells/WellsManager.cpp +++ b/opm/core/wells/WellsManager.cpp @@ -623,9 +623,6 @@ namespace Opm if (cpos == -1 && mode != WellsManagerDetail::ProductionControl::GRUP) { OPM_THROW(std::runtime_error, "Control mode type " << mode << " not present in well " << well_names[well_index]); } - if (cpos == -1 && mode != WellsManagerDetail::ProductionControl::GRUP) { - OPM_THROW(std::runtime_error, "Control mode type " << mode << " not present in well " << well_names[well_index]); - } else { set_current_control(well_index, cpos, w_); }