From 3ab2283bd7ecfa73c034776f39095fe6e30797ed Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joan=20Sol=C3=A0?= <jsola@iri.upc.edu>
Date: Mon, 2 Sep 2019 00:04:17 +0200
Subject: [PATCH] small var rename for consistency with convention

---
 include/core/problem/problem.h |  6 +++---
 src/problem/problem.cpp        | 24 ++++++++++++------------
 2 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/include/core/problem/problem.h b/include/core/problem/problem.h
index a7432b151..1bb4fe486 100644
--- a/include/core/problem/problem.h
+++ b/include/core/problem/problem.h
@@ -262,10 +262,10 @@ class Problem : public std::enable_shared_from_this<Problem>
 
         // State getters
         Eigen::VectorXs getCurrentState         ( ) const;
-        void            getCurrentState         (Eigen::VectorXs& state) const;
-        void            getCurrentStateAndStamp (Eigen::VectorXs& state, TimeStamp& _ts) const;
+        void            getCurrentState         (Eigen::VectorXs& _state) const;
+        void            getCurrentStateAndStamp (Eigen::VectorXs& _state, TimeStamp& _ts) const;
         Eigen::VectorXs getState                (const TimeStamp& _ts) const;
-        void            getState                (const TimeStamp& _ts, Eigen::VectorXs& state) const;
+        void            getState                (const TimeStamp& _ts, Eigen::VectorXs& _state) const;
         // Zero state provider
         Eigen::VectorXs zeroState ( ) const;
         bool priorIsSet() const;
diff --git a/src/problem/problem.cpp b/src/problem/problem.cpp
index ffed8bb92..bcb8945b9 100644
--- a/src/problem/problem.cpp
+++ b/src/problem/problem.cpp
@@ -328,42 +328,42 @@ Eigen::VectorXs Problem::getCurrentState() const
     return state;
 }
 
-void Problem::getCurrentState(Eigen::VectorXs& state) const
+void Problem::getCurrentState(Eigen::VectorXs& _state) const
 {
     if (processor_motion_ptr_ != nullptr)
-        processor_motion_ptr_->getCurrentState(state);
+        processor_motion_ptr_->getCurrentState(_state);
     else if (trajectory_ptr_->getLastKeyOrAuxFrame() != nullptr)
-        trajectory_ptr_->getLastKeyOrAuxFrame()->getState(state);
+        trajectory_ptr_->getLastKeyOrAuxFrame()->getState(_state);
     else
-        state = zeroState();
+        _state = zeroState();
 }
 
-void Problem::getCurrentStateAndStamp(Eigen::VectorXs& state, TimeStamp& ts) const
+void Problem::getCurrentStateAndStamp(Eigen::VectorXs& _state, TimeStamp& ts) const
 {
     if (processor_motion_ptr_ != nullptr)
     {
-        processor_motion_ptr_->getCurrentState(state);
+        processor_motion_ptr_->getCurrentState(_state);
         processor_motion_ptr_->getCurrentTimeStamp(ts);
     }
     else if (trajectory_ptr_->getLastKeyOrAuxFrame() != nullptr)
     {
         trajectory_ptr_->getLastKeyOrAuxFrame()->getTimeStamp(ts);
-        trajectory_ptr_->getLastKeyOrAuxFrame()->getState(state);
+        trajectory_ptr_->getLastKeyOrAuxFrame()->getState(_state);
     }
     else
-        state = zeroState();
+        _state = zeroState();
 }
 
-void Problem::getState(const TimeStamp& _ts, Eigen::VectorXs& state) const
+void Problem::getState(const TimeStamp& _ts, Eigen::VectorXs& _state) const
 {
     // try to get the state from processor_motion if any, otherwise...
-    if (processor_motion_ptr_ == nullptr || !processor_motion_ptr_->getState(_ts, state))
+    if (processor_motion_ptr_ == nullptr || !processor_motion_ptr_->getState(_ts, _state))
     {
         FrameBasePtr closest_frame = trajectory_ptr_->closestKeyOrAuxFrameToTimeStamp(_ts);
         if (closest_frame != nullptr)
-            closest_frame->getState(state);
+            closest_frame->getState(_state);
         else
-            state = zeroState();
+            _state = zeroState();
     }
 }
 
-- 
GitLab