From 2e7d782bb27e9077068f1a63766cf3428021f270 Mon Sep 17 00:00:00 2001 From: Oliver Sander <sander@dune-project.org> Date: Tue, 28 Aug 2007 12:25:05 +0000 Subject: [PATCH] pass default string by const reference instead of by value [[Imported from SVN: r4982]] --- common/configparser.cc | 2 +- common/configparser.hh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/configparser.cc b/common/configparser.cc index c1e387fcc..95746777c 100644 --- a/common/configparser.cc +++ b/common/configparser.cc @@ -182,7 +182,7 @@ string& ConfigParser::operator[] (const string& key) } } -string ConfigParser::get(const string& key, string defaultValue) +string ConfigParser::get(const string& key, const string& defaultValue) { if (hasKey(key)) return (*this)[key]; diff --git a/common/configparser.hh b/common/configparser.hh index 8a3359cad..2b3451842 100644 --- a/common/configparser.hh +++ b/common/configparser.hh @@ -145,7 +145,7 @@ namespace Dune { * \param defaultValue default if key does not exist * \return value as string */ - std::string get(const std::string& key, std::string defaultValue); + std::string get(const std::string& key, const std::string& defaultValue); /** \brief get value as int -- GitLab