Skip to content

Commit

Permalink
ros-controls#191 added operator-bool to Handle<> template class for t…
Browse files Browse the repository at this point in the history
…esting if handle has a reference set. uncrustify fixes on joint limits macros
  • Loading branch information
guru-florida committed Oct 23, 2020
1 parent ddd222b commit f76ae53
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions hardware_interface/include/hardware_interface/handle.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ class Handle
{
}

/// \brief returns true if handle references a value
inline operator bool() const {return value_ptr_ != nullptr;}

HARDWARE_INTERFACE_PUBLIC
HandleType with_value_ptr(double * value_ptr)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@
#include "joint_limits_interface/joint_limits_interface_exception.hpp"


#define DEFAULT_POSITION_HANDLE { std::string(), "position" }
#define DEFAULT_VELOCITY_HANDLE { std::string(), "velocity" }
#define DEFAULT_COMMAND_HANDLE { std::string(), "position_command" }
#define DEFAULT_POSITION_HANDLE {std::string(), "position"}
#define DEFAULT_VELOCITY_HANDLE {std::string(), "velocity"}
#define DEFAULT_COMMAND_HANDLE {std::string(), "position_command"}

namespace joint_limits_interface
{
Expand Down

0 comments on commit f76ae53

Please sign in to comment.