Merge pull request #2607 from akva2/janitoring
Some more SCA warning cleanup
This commit is contained in:
commit
612cbf749c
@ -85,7 +85,7 @@ namespace Opm {
|
||||
|
||||
Aquancon() = default;
|
||||
Aquancon(const EclipseGrid& grid, const Deck& deck);
|
||||
Aquancon(const std::unordered_map<int, std::vector<Aquancon::AquancCell>>& data);
|
||||
explicit Aquancon(const std::unordered_map<int, std::vector<Aquancon::AquancCell>>& data);
|
||||
|
||||
static Aquancon serializeObject();
|
||||
|
||||
|
@ -96,7 +96,7 @@ class Aquifetp {
|
||||
|
||||
Aquifetp() = default;
|
||||
Aquifetp(const TableManager& tables, const Deck& deck);
|
||||
Aquifetp(const std::vector<Aquifetp::AQUFETP_data>& data);
|
||||
explicit Aquifetp(const std::vector<Aquifetp::AQUFETP_data>& data);
|
||||
|
||||
static Aquifetp serializeObject();
|
||||
|
||||
|
@ -55,7 +55,7 @@ namespace Opm {
|
||||
};
|
||||
|
||||
EclipseState() = default;
|
||||
EclipseState(const Deck& deck);
|
||||
explicit EclipseState(const Deck& deck);
|
||||
virtual ~EclipseState() = default;
|
||||
|
||||
const IOConfig& getIOConfig() const;
|
||||
|
@ -232,7 +232,7 @@ namespace Opm {
|
||||
const std::vector<double>& zcorn ,
|
||||
const int * actnum);
|
||||
|
||||
bool keywInputBeforeGdfile(const Deck& deck, const std::string keyword) const;
|
||||
bool keywInputBeforeGdfile(const Deck& deck, const std::string& keyword) const;
|
||||
|
||||
void initCylindricalGrid(const Deck&);
|
||||
void initSpiderwebGrid(const Deck&);
|
||||
|
@ -61,7 +61,7 @@ private:
|
||||
std::array<double, 2> unit_x;
|
||||
std::array<double, 2> unit_y;
|
||||
std::vector<float> m_input;
|
||||
double inv_norm;
|
||||
double inv_norm = 1.0;
|
||||
std::optional<std::string> map_units;
|
||||
};
|
||||
|
||||
|
@ -56,7 +56,7 @@ class TLMixpar {
|
||||
public:
|
||||
|
||||
TLMixpar() = default;
|
||||
TLMixpar(const Deck& deck);
|
||||
explicit TLMixpar(const Deck& deck);
|
||||
static TLMixpar serializeObject();
|
||||
std::size_t size() const;
|
||||
bool empty() const;
|
||||
|
@ -55,10 +55,10 @@ public:
|
||||
void resetFilter();
|
||||
|
||||
template <typename T>
|
||||
void addFilter(std::string param1, std::string opperator, T num);
|
||||
void addFilter(const std::string& param1, const std::string& opperator, T num);
|
||||
|
||||
template <typename T>
|
||||
void addFilter(std::string param1, std::string opperator, T num1, T num2);
|
||||
void addFilter(const std::string& param1, const std::string& opperator, T num1, T num2);
|
||||
|
||||
void setDepthfwl(const std::vector<float>& fwl);
|
||||
|
||||
@ -116,13 +116,13 @@ private:
|
||||
const std::vector<float>& getSolutionFloat(const std::string& name);
|
||||
|
||||
template <typename T>
|
||||
const std::vector<T>& get_filter_param(std::string param1);
|
||||
const std::vector<T>& get_filter_param(const std::string& param1);
|
||||
|
||||
template <typename T>
|
||||
void updateActiveFilter(const std::vector<T>& paramVect, const std::string opperator, T value);
|
||||
void updateActiveFilter(const std::vector<T>& paramVect, const std::string& opperator, T value);
|
||||
|
||||
template <typename T>
|
||||
void updateActiveFilter(const std::vector<T>& paramVect, const std::string opperator, T value1, T value2);
|
||||
void updateActiveFilter(const std::vector<T>& paramVect, const std::string& opperator, T value1, T value2);
|
||||
|
||||
};
|
||||
|
||||
|
@ -435,7 +435,7 @@ EclipseGrid::EclipseGrid(const Deck& deck, const int * actnum)
|
||||
zcorn_fixed = mapper.fixupZCORN( m_zcorn );
|
||||
}
|
||||
|
||||
bool EclipseGrid::keywInputBeforeGdfile(const Deck& deck, const std::string keyword) const {
|
||||
bool EclipseGrid::keywInputBeforeGdfile(const Deck& deck, const std::string& keyword) const {
|
||||
|
||||
std::vector<std::string> keywordList;
|
||||
keywordList.reserve(deck.size());
|
||||
|
@ -81,7 +81,7 @@ Value::Value(double value) :
|
||||
is_scalar(true)
|
||||
{ }
|
||||
|
||||
Value::Value(const std::string& wname, double value) {
|
||||
Value::Value(const std::string& wname, double value) : scalar_value(0.0) {
|
||||
this->add_well(wname, value);
|
||||
}
|
||||
|
||||
|
@ -261,7 +261,7 @@ void EModel::resetFilter()
|
||||
|
||||
|
||||
template <typename T>
|
||||
void EModel::updateActiveFilter(const std::vector<T>& paramVect, const std::string opperator, T value)
|
||||
void EModel::updateActiveFilter(const std::vector<T>& paramVect, const std::string& opperator, T value)
|
||||
{
|
||||
if ((opperator == "eq") || (opperator == "==")){
|
||||
for (size_t i = 0; i < paramVect.size(); i++)
|
||||
@ -287,7 +287,7 @@ void EModel::updateActiveFilter(const std::vector<T>& paramVect, const std::stri
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void EModel::updateActiveFilter(const std::vector<T>& paramVect, const std::string opperator, T value1, T value2)
|
||||
void EModel::updateActiveFilter(const std::vector<T>& paramVect, const std::string& opperator, T value1, T value2)
|
||||
{
|
||||
if ((opperator == "in") || (opperator == "between")) {
|
||||
for (size_t i = 0; i < paramVect.size(); i++)
|
||||
@ -302,7 +302,7 @@ void EModel::updateActiveFilter(const std::vector<T>& paramVect, const std::stri
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
const std::vector<T>& EModel::get_filter_param(std::string param)
|
||||
const std::vector<T>& EModel::get_filter_param(const std::string& param)
|
||||
{
|
||||
if constexpr (std::is_same<T, int>::value){
|
||||
if ((param == "I") || (param == "ROW"))
|
||||
@ -335,21 +335,21 @@ const std::vector<T>& EModel::get_filter_param(std::string param)
|
||||
|
||||
|
||||
template <>
|
||||
void EModel::addFilter<int>(std::string param1, std::string opperator, int num)
|
||||
void EModel::addFilter<int>(const std::string& param1, const std::string& opperator, int num)
|
||||
{
|
||||
std::vector<int> paramVect = get_filter_param<int>(param1);
|
||||
updateActiveFilter(paramVect, opperator, num);
|
||||
}
|
||||
|
||||
template <>
|
||||
void EModel::addFilter<int>(std::string param1, std::string opperator, int num1, int num2)
|
||||
void EModel::addFilter<int>(const std::string& param1, const std::string& opperator, int num1, int num2)
|
||||
{
|
||||
std::vector<int> paramVect = get_filter_param<int>(param1);;
|
||||
updateActiveFilter(paramVect, opperator, num1, num2);
|
||||
}
|
||||
|
||||
template <>
|
||||
void EModel::addFilter<float>(std::string param1, std::string opperator, float num)
|
||||
void EModel::addFilter<float>(const std::string& param1, const std::string& opperator, float num)
|
||||
{
|
||||
std::vector<float> paramVect = get_filter_param<float>(param1);
|
||||
updateActiveFilter(paramVect, opperator, num);
|
||||
@ -357,7 +357,7 @@ void EModel::addFilter<float>(std::string param1, std::string opperator, float n
|
||||
|
||||
|
||||
template <>
|
||||
void EModel::addFilter<float>(std::string param1, std::string opperator, float num1, float num2)
|
||||
void EModel::addFilter<float>(const std::string& param1, const std::string& opperator, float num1, float num2)
|
||||
{
|
||||
std::vector<float> paramVect = get_filter_param<float>(param1);
|
||||
updateActiveFilter(paramVect, opperator, num1, num2);
|
||||
|
@ -269,7 +269,7 @@ AQUTAB
|
||||
ct.finishInitialisation(waterProperties());
|
||||
}
|
||||
|
||||
return { properties };
|
||||
return Opm::AquiferCT(properties);
|
||||
}
|
||||
|
||||
void connectFetkovic(AquiferConnections& aquancon)
|
||||
@ -329,7 +329,7 @@ AQUTAB
|
||||
fetp.finishInitialisation(waterProperties());
|
||||
}
|
||||
|
||||
return { properties };
|
||||
return Opm::Aquifetp(properties);
|
||||
}
|
||||
|
||||
Opm::AquiferConfig createAquiferConfig()
|
||||
@ -339,7 +339,7 @@ AQUTAB
|
||||
connectFetkovic(aquancon);
|
||||
|
||||
return {
|
||||
createFetkovich(), createCarterTracy(), aquancon.getAllConnections()
|
||||
createFetkovich(), createCarterTracy(), Opm::Aquancon(aquancon.getAllConnections())
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -172,7 +172,7 @@ END
|
||||
Opm::Parser{}.parseString(input)
|
||||
};
|
||||
|
||||
return {deck};
|
||||
return Opm::EclipseState{deck};
|
||||
}
|
||||
|
||||
std::vector<double> expect_SGFN()
|
||||
@ -324,7 +324,7 @@ END
|
||||
Opm::Parser{}.parseString(input)
|
||||
};
|
||||
|
||||
return {deck};
|
||||
return Opm::EclipseState{deck};
|
||||
}
|
||||
|
||||
std::vector<double> expect_SOFN()
|
||||
@ -495,7 +495,7 @@ END
|
||||
Opm::Parser{}.parseString(input)
|
||||
};
|
||||
|
||||
return {deck};
|
||||
return Opm::EclipseState{deck};
|
||||
}
|
||||
|
||||
std::vector<double> expect_SGFN()
|
||||
@ -652,7 +652,7 @@ END
|
||||
Opm::Parser{}.parseString(input)
|
||||
};
|
||||
|
||||
return {deck};
|
||||
return Opm::EclipseState{deck};
|
||||
}
|
||||
|
||||
std::vector<double> expect_SGFN()
|
||||
@ -823,7 +823,7 @@ END
|
||||
Opm::Parser{}.parseString(input)
|
||||
};
|
||||
|
||||
return {deck};
|
||||
return Opm::EclipseState{deck};
|
||||
}
|
||||
|
||||
std::vector<double> expect_SOFN()
|
||||
@ -1007,7 +1007,7 @@ END
|
||||
Opm::Parser{}.parseString(input)
|
||||
};
|
||||
|
||||
return {deck};
|
||||
return Opm::EclipseState{deck};
|
||||
}
|
||||
|
||||
std::vector<double> expect_SGFN()
|
||||
@ -1494,7 +1494,7 @@ namespace {
|
||||
Opm::EclipseState parse(const std::string& rspec,
|
||||
const std::string& props)
|
||||
{
|
||||
return {
|
||||
return Opm::EclipseState{
|
||||
Opm::Parser{}.parseString(rspec + R"(GRID
|
||||
INIT
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user