From 2b534f138a45d47788f676cfae372dbd4c741a75 Mon Sep 17 00:00:00 2001 From: florent <florent@laas.fr> Date: Tue, 26 Oct 2010 15:46:58 +0200 Subject: [PATCH] Make function return values instead of reference to values. * include/dynamic-graph/command.h, * src/command/command.cpp. --- include/dynamic-graph/command.h | 4 ++-- src/command/command.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/dynamic-graph/command.h b/include/dynamic-graph/command.h index c8ad75e8..15824c98 100644 --- a/include/dynamic-graph/command.h +++ b/include/dynamic-graph/command.h @@ -40,11 +40,11 @@ namespace dynamicgraph { /// \param valueTypes vector specifying the number and types of parameters Command(Entity& entity, const std::vector<Value::Type>& valueTypes); /// Return the value type of all parameters - const std::vector<Value::Type>& valueTypes() const; + const std::vector<Value::Type> valueTypes() const; /// Set parameter values void setParameterValues(const std::vector<Value>& values); /// Get parameter values - const std::vector<Value>& getParameterValues() const; + const std::vector<Value> getParameterValues() const; /// Execute the command after checking parameters Value execute(); /// Get a reference to the Entity owning this command diff --git a/src/command/command.cpp b/src/command/command.cpp index 8411c58a..eb89ec82 100644 --- a/src/command/command.cpp +++ b/src/command/command.cpp @@ -29,7 +29,7 @@ namespace dynamicgraph { { } - const std::vector<Value::Type>& Command::valueTypes() const + const std::vector<Value::Type> Command::valueTypes() const { return valueTypeVector_; } @@ -62,7 +62,7 @@ namespace dynamicgraph { } } - const std::vector<Value>& Command::getParameterValues() const + const std::vector<Value> Command::getParameterValues() const { return valueVector_; } -- GitLab