Remove [-Wreturn-type] warnings (added throw), added copyright header

This commit is contained in:
Pål Grønås Drange 2016-06-20 14:13:29 +02:00
parent 010480a7de
commit e9c2382b45
2 changed files with 44 additions and 0 deletions

View File

@ -1,3 +1,22 @@
/*
Copyright 2016 The Open Porous Media project.
This file is part of the Open Porous Media project (OPM).
OPM is free software: you can redistribute it and/or modify it under the terms
of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or (at your option) any later
version.
OPM is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
OPM. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdexcept>
#include "config.h"
#include <opm/core/wells/InjectionSpecification.hpp>
@ -32,6 +51,7 @@ namespace Opm
case ControlMode::GRUP: return "GRUP";
case ControlMode::FLD : return "FLD" ;
}
throw new std::domain_error("Unknown control mode");
}
@ -43,6 +63,7 @@ namespace Opm
case InjectorType::OIL : return "OIL" ;
case InjectorType::GAS : return "GAS" ;
}
throw new std::domain_error("Unknown injector type");
}
@ -53,5 +74,6 @@ namespace Opm
case GuideRateType::RAT : return "RAT" ;
case GuideRateType::NONE_GRT: return "NONE_GRT";
}
throw new std::domain_error("Unknown guide rate type");
}
} // namespace Opm

View File

@ -1,3 +1,22 @@
/*
Copyright 2016 The Open Porous Media project.
This file is part of the Open Porous Media project (OPM).
OPM is free software: you can redistribute it and/or modify it under the terms
of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or (at your option) any later
version.
OPM is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
OPM. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdexcept>
#include "config.h"
#include <opm/core/wells/ProductionSpecification.hpp>
@ -37,6 +56,7 @@ namespace Opm
case ControlMode::GRUP: return "GRUP";
case ControlMode::FLD : return "FLD" ;
}
throw new std::domain_error("Unknown control mode");
}
@ -48,6 +68,7 @@ namespace Opm
case Procedure::RATE : return "RATE" ;
case Procedure::WELL : return "WELL" ;
}
throw new std::domain_error("Unknown procedure");
}
@ -60,6 +81,7 @@ namespace Opm
case GuideRateType::WATER : return "WATER" ;
case GuideRateType::NONE_GRT: return "NONE_GRT";
}
throw new std::domain_error("Unknown guide rate type");
}