diff --git a/ProcessLib/Output/SecondaryVariable.cpp b/ProcessLib/Output/SecondaryVariable.cpp index 604b152d1d83dde9ff262114cbd342b2cff4ebcb..b167f810a10c48f04c7d7a0b1c5e5d815e3ea14b 100644 --- a/ProcessLib/Output/SecondaryVariable.cpp +++ b/ProcessLib/Output/SecondaryVariable.cpp @@ -39,19 +39,19 @@ void SecondaryVariableCollection::addSecondaryVariable( } std::map<std::string, std::string>::const_iterator -SecondaryVariableCollection::begin() +SecondaryVariableCollection::begin() const { return _map_external_to_internal.cbegin(); } std::map<std::string, std::string>::const_iterator -SecondaryVariableCollection::end() +SecondaryVariableCollection::end() const { return _map_external_to_internal.cend(); } SecondaryVariable const& SecondaryVariableCollection::get( - std::string const& external_name) + std::string const& external_name) const { auto const it = _map_external_to_internal.find(external_name); diff --git a/ProcessLib/Output/SecondaryVariable.h b/ProcessLib/Output/SecondaryVariable.h index 9ae67da8ae376d9ce510c6d55392199b7cc86ea9..d00eb112f81740ce335e10ba0272f410c7126dd1 100644 --- a/ProcessLib/Output/SecondaryVariable.h +++ b/ProcessLib/Output/SecondaryVariable.h @@ -130,10 +130,10 @@ public: SecondaryVariableFunctions&& fcts); //! Returns the secondary variable with the given external name. - SecondaryVariable const& get(std::string const& external_name); + SecondaryVariable const& get(std::string const& external_name) const; - std::map<std::string, std::string>::const_iterator begin(); - std::map<std::string, std::string>::const_iterator end(); + std::map<std::string, std::string>::const_iterator begin() const; + std::map<std::string, std::string>::const_iterator end() const; private: //! Maps external variable names to internal ones.