pass by const reference
This commit is contained in:
parent
7b2b58caa8
commit
add60560ee
@ -59,7 +59,7 @@ private:
|
||||
std::vector<std::vector<float>> m_smrydata;
|
||||
|
||||
std::array<int, 3> ijk_from_global_index(const GridDims& dims, int globInd) const;
|
||||
std::vector<std::string> make_modified_keys(const std::vector<std::string> valueKeys, const GridDims& dims);
|
||||
std::vector<std::string> make_modified_keys(const std::vector<std::string>& valueKeys, const GridDims& dims);
|
||||
};
|
||||
|
||||
|
||||
|
@ -360,7 +360,7 @@ void ExtESmry::loadData(const std::vector<std::string>& stringVect)
|
||||
{
|
||||
std::vector<int> keyIndexVect;
|
||||
|
||||
for (auto key: stringVect)
|
||||
for (const auto& key: stringVect)
|
||||
keyIndexVect.push_back(m_keyword_index[0].at(key));
|
||||
|
||||
std::fstream fileH;
|
||||
@ -455,7 +455,7 @@ std::vector<std::string> ExtESmry::keywordList(const std::string& pattern) const
|
||||
{
|
||||
std::vector<std::string> list;
|
||||
|
||||
for (auto key : m_keyword)
|
||||
for (const auto& key : m_keyword)
|
||||
if (fnmatch( pattern.c_str(), key.c_str(), 0 ) == 0 )
|
||||
list.push_back(key);
|
||||
|
||||
|
@ -116,7 +116,7 @@ void ExtSmryOutput::write(const std::vector<float>& ts_data, int report_step)
|
||||
}
|
||||
|
||||
|
||||
std::vector<std::string> ExtSmryOutput::make_modified_keys(const std::vector<std::string> valueKeys, const GridDims& dims)
|
||||
std::vector<std::string> ExtSmryOutput::make_modified_keys(const std::vector<std::string>& valueKeys, const GridDims& dims)
|
||||
{
|
||||
std::vector<std::string> mod_keys;
|
||||
mod_keys.reserve(valueKeys.size());
|
||||
|
Loading…
Reference in New Issue
Block a user