Silence various warnings (shadowing, unused args or funcs).

This commit is contained in:
Atgeirr Flø Rasmussen
2018-06-28 17:03:10 +02:00
parent 89e95b0789
commit 986abc1bdc
7 changed files with 15 additions and 35 deletions

View File

@@ -284,7 +284,7 @@ namespace {
std::vector<int> serialize_ICON( int sim_step,
int ncwmax,
const std::vector<const Well*>& sched_wells,
const EclipseGrid& grid) {
const EclipseGrid& /*grid*/) {
size_t well_offset = 0;
std::vector<int> data( sched_wells.size() * ncwmax * NICONZ , 0 );

View File

@@ -1017,7 +1017,8 @@ Summary::Summary( const EclipseState& st,
node.num(), // NUMS value for the summary output.
{}, // Well results - data::Wells
{}, // Region <-> cell mappings.
this->grid};
this->grid,
{}};
const auto val = handle( no_args );
@@ -1042,7 +1043,7 @@ Summary::Summary( const EclipseState& st,
// for simulation restart.
{
auto& rvec = this->handlers->rstvec_backing_store;
auto& handlers = this->handlers->handlers;
auto& hndlrs = this->handlers->handlers;
for (const auto& vector : requiredRestartVectors(schedule)) {
const auto& kw = vector.first;
@@ -1063,7 +1064,7 @@ Summary::Summary( const EclipseState& st,
}
rvec.push_back(makeRestartVectorSMSPEC(kw, entity));
handlers.emplace_back(rvec.back().get(), func->second);
hndlrs.emplace_back(rvec.back().get(), func->second);
}
}

View File

@@ -39,7 +39,7 @@ namespace Opm {
Connection::Connection(int i, int j , int k ,
int compnum,
double depth,
WellCompletion::StateEnum state ,
WellCompletion::StateEnum stateArg ,
const Value<double>& connectionTransmissibilityFactor,
const Value<double>& diameter,
const Value<double>& skinFactor,
@@ -47,7 +47,7 @@ namespace Opm {
const WellCompletion::DirectionEnum direction)
: dir(direction),
center_depth(depth),
state(state),
state(stateArg),
sat_tableId(satTableId),
complnum( compnum ),
ijk({i,j,k}),

View File

@@ -541,17 +541,6 @@ namespace Opm {
handleWCONProducer( keyword, currentStep, true, parseContext);
}
static Opm::Value<int> getValueItem( const DeckItem& item ){
Opm::Value<int> data(item.name());
if(item.hasValue(0)) {
int tempValue = item.get< int >(0);
if( tempValue >0){
data.setValue(tempValue-1);
}
}
return data;
}
void Schedule::handleWPIMULT( const DeckKeyword& keyword, size_t currentStep) {
for( const auto& record : keyword ) {
const std::string& wellNamePattern = record.getItem("WELL").getTrimmedString(0);
@@ -860,16 +849,6 @@ namespace Opm {
}
}
namespace {
bool defaulted( int x ) { return x < 0; }
int maybe( const DeckRecord& rec, const std::string& s ) {
const auto& item = rec.getItem( s );
return item.defaultApplied( 0 ) ? -1 : item.get< int >( 0 ) - 1;
}
}
void Schedule::handleCOMPLUMP( const DeckKeyword& keyword,
size_t timestep ) {

View File

@@ -23,7 +23,7 @@
namespace Opm {
UDQ::UDQ(const UDQConfig& config, const Deck& deck) {
UDQ::UDQ(const UDQConfig& /* config */, const Deck& deck) {
if (deck.hasKeyword("UDQ")) {
const auto& kw = deck.getKeyword("UDQ");
for (const auto& record : kw)

View File

@@ -73,11 +73,11 @@ namespace Opm {
2. For items like '2*(1+WBHP)' the parsing code will expand the 2*
operator to the repeated tokens : (1+WBHP), (1+WBHP)
*/
UDQExpression::UDQExpression(const std::string& action, const std::string& keyword, const std::vector<std::string>& input_data) {
assertKeyword(keyword);
UDQExpression::UDQExpression(const std::string& action_in, const std::string& keyword_in, const std::vector<std::string>& input_data) {
assertKeyword(keyword_in);
this->action = actionString2Enum(action);
this->keyword = keyword;
this->action = actionString2Enum(action_in);
this->keyword = keyword_in;
for (const std::string& item : input_data) {
if (RawConsts::is_quote()(item[0])) {

View File

@@ -29,9 +29,9 @@
namespace Opm {
WellConnections::WellConnections(int headI, int headJ) :
headI(headI),
headJ(headJ)
WellConnections::WellConnections(int headIArg, int headJArg) :
headI(headIArg),
headJ(headJArg)
{
}