Commit 9592ff02 authored by Florent Lamiraux's avatar Florent Lamiraux Committed by Florent Lamiraux florent@laas.fr
Browse files

Fix compilation warning.

    Do not return const object,
    add braces around else statement.
parent bb418fab
...@@ -116,7 +116,7 @@ namespace hpp { ...@@ -116,7 +116,7 @@ namespace hpp {
/// \brief Get robot at given rank in the Problem vector. /// \brief Get robot at given rank in the Problem vector.
/// \param rank /// \param rank
/// \return the shared pointer on the robot /// \return the shared pointer on the robot
const CkppDeviceComponentShPtr robotIthProblem(unsigned int rank) const; CkppDeviceComponentShPtr robotIthProblem(unsigned int rank) const;
/// \brief Get current configuration of i-th robot. /// \brief Get current configuration of i-th robot.
/// \param rank : Id of problem in vector. /// \param rank : Id of problem in vector.
......
...@@ -188,7 +188,7 @@ namespace hpp { ...@@ -188,7 +188,7 @@ namespace hpp {
// ====================================================================== // ======================================================================
const CkppDeviceComponentShPtr CkppDeviceComponentShPtr
Planner::robotIthProblem(unsigned int rank) const Planner::robotIthProblem(unsigned int rank) const
{ {
CkppDeviceComponentShPtr nullShPtr; CkppDeviceComponentShPtr nullShPtr;
...@@ -792,9 +792,11 @@ namespace hpp { ...@@ -792,9 +792,11 @@ namespace hpp {
CkcdObjectShPtr kcdObject = CkcdObjectShPtr kcdObject =
KIT_DYNAMIC_PTR_CAST(CkcdObject, component); KIT_DYNAMIC_PTR_CAST(CkcdObject, component);
if(kcdObject) deviceBodies.insert(kcdObject); if(kcdObject) deviceBodies.insert(kcdObject);
else hppDout (error, "Cannot cast component " else {
<< component->name() hppDout (error, "Cannot cast component "
<< " to CkcdObject"); << component->name()
<< " to CkcdObject");
}
} }
currentRank++; currentRank++;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment