Fixed tests in resource-encapsulation by using move ctor
DiscoveryTaskPtr is a unique_ptr, therefore it is a move-only object,
which is why ScopeTask's copy constructor is deleted.
This change Fix FTBFS by declaring move constructor (C++11 &&) in Task class
and also use it also in instance declaration to avoid copies.
Issue appeared with g++-4.9.2 on Tizen:Common and probably other setup
Reported error message is in this form :
service/resource-encapsulation/unittests/DiscoveryManagerTest.cpp: \
In member function 'virtual void DiscoveryManagerTest_CallbackWouldNotBeCalledForSameRemoteResource_Test::TestBody()':
service/resource-encapsulation/unittests/DiscoveryManagerTest.cpp:139:33: \
error: use of deleted function 'ScopedTask::ScopedTask(const ScopedTask&)'
onResourceDiscovered);
^
Change-Id: I0fe6d5c4037ddf90e83185d96f99c9378c56caa7
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/5361
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>