Skip to content
Snippets Groups Projects
Commit 26241c1d authored by Guillaume Pasero's avatar Guillaume Pasero
Browse files

BUG: const GetParameterByKey should have same behaviour as non-const version

parent c0944562
No related branches found
No related tags found
No related merge requests found
...@@ -167,7 +167,7 @@ public: ...@@ -167,7 +167,7 @@ public:
/* Get the internal application parameter specified /* Get the internal application parameter specified
* *
* WARNING: this method may disappear from the API */ * WARNING: this method may disappear from the API */
const Parameter* GetParameterByKey(std::string parameter) const; const Parameter* GetParameterByKey(std::string parameter, bool follow=true) const;
/* Returns the description of a parameter */ /* Returns the description of a parameter */
std::string GetParameterName(std::string paramKey); std::string GetParameterName(std::string paramKey);
......
...@@ -297,11 +297,11 @@ void Application::SetParameterUserValue(std::string paramKey, bool value) ...@@ -297,11 +297,11 @@ void Application::SetParameterUserValue(std::string paramKey, bool value)
GetParameterByKey(paramKey)->SetUserValue(value); GetParameterByKey(paramKey)->SetUserValue(value);
} }
const Parameter* Application::GetParameterByKey(std::string name) const const Parameter* Application::GetParameterByKey(std::string name, bool follow) const
{ {
// GetParameterList is non const... // GetParameterList is non const...
Application* _this = const_cast<Application*>(this); Application* _this = const_cast<Application*>(this);
return _this->GetParameterByKey(name); return _this->GetParameterByKey(name,follow);
} }
void Application::Init() void Application::Init()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment