const std::string&, OCConnectivityType, SubscribeCallback);
invokeOCFunc(static_cast<SubscribePresence>(OC::OCPlatform::subscribePresence),
- handle, host, connectivityType, presenceHandler);
+ handle, host, connectivityType, std::move(presenceHandler));
}
void subscribePresence(OCDoHandle& handle, const std::string& host,
const std::string&, const std::string&, OCConnectivityType, SubscribeCallback);
invokeOCFunc(static_cast<SubscribePresence>(OC::OCPlatform::subscribePresence),
- handle, host, resourceType, connectivityType, presenceHandler);
+ handle, host, resourceType, connectivityType, std::move(presenceHandler));
}
void unsubscribePresence(OCDoHandle handle)
OCConnectivityType connectivityType, SubscribeCallback presenceHandler) :
m_handle{ nullptr }
{
- subscribePresence(m_handle, host, connectivityType, presenceHandler);
+ subscribePresence(m_handle, host, connectivityType, std::move(presenceHandler));
}
PresenceSubscriber::PresenceSubscriber(const std::string& host,
SubscribeCallback presenceHandler) :
m_handle{ nullptr }
{
- subscribePresence(m_handle, host, resourceType, connectivityType, presenceHandler);
+ subscribePresence(m_handle, host, resourceType, connectivityType,
+ std::move(presenceHandler));
}
PresenceSubscriber::~PresenceSubscriber()