Skip to content

Commit

Permalink
follow_me: small improvement
Browse files Browse the repository at this point in the history
We only need the placeholder once, `using namespace` is not really
needed.
  • Loading branch information
julianoes committed Sep 30, 2018
1 parent 6a110db commit 3211597
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions plugins/follow_me/follow_me_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

namespace dronecode_sdk {

using namespace std::placeholders; // for `_1`

FollowMeImpl::FollowMeImpl(System &system) : PluginImplBase(system)
{
// (Lat, Lon, Alt) => double, (vx, vy, vz) => float
Expand All @@ -22,9 +20,10 @@ FollowMeImpl::~FollowMeImpl()

void FollowMeImpl::init()
{
_parent->register_mavlink_message_handler(MAVLINK_MSG_ID_HEARTBEAT,
std::bind(&FollowMeImpl::process_heartbeat, this, _1),
static_cast<void *>(this));
_parent->register_mavlink_message_handler(
MAVLINK_MSG_ID_HEARTBEAT,
std::bind(&FollowMeImpl::process_heartbeat, this, std::placeholders::_1),
static_cast<void *>(this));
}

void FollowMeImpl::deinit()
Expand Down

0 comments on commit 3211597

Please sign in to comment.