Fixed build issue by generating ~DiscoveryTask code
authorPhilippe Coval <philippe.coval@osg.samsung.com>
Fri, 4 Mar 2016 23:50:05 +0000 (00:50 +0100)
committerHabib Virji <habib.virji@samsung.com>
Tue, 8 Mar 2016 01:10:02 +0000 (01:10 +0000)
If declared as default (and not defined), this function will be inlined,
but in some cases (using shared libraries?) inlining is not appropriate,
so it's preferred to make a regular declaration and still use the default
capabilities for definition.

Problem was observed while building using tizen-sdk :

    libresource_hosting.so: undefined reference to \
    `OIC::Service::RCSDiscoveryManager::DiscoveryTask::~DiscoveryTask()'

This message apeared while building RHSampleApp using tizen-sdk 2.4.0 Rev4
with imported libs (built with gbs from Tizen:2.4:Mobile repo)

Used toolchain for Tizen:2.4:Mobile is arm-linux-gnueabi-g++ (GCC) 4.9.2

Change-Id: I708812404b01c35f09e8aa68afad962c7d6e0df3
Origin: https://github.com/TizenTeam/iotivity/tree/sandbox/pcoval/for-upstream
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/5445
Reviewed-by: Robert Spielmann <spielmann@kellendonk.de>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Habib Virji <habib.virji@samsung.com>
service/resource-encapsulation/include/RCSDiscoveryManager.h
service/resource-encapsulation/src/resourceClient/RCSDiscoveryManager.cpp

index 71b260a..c368e55 100644 (file)
@@ -57,7 +57,7 @@ namespace OIC
             public:
                 typedef std::unique_ptr< DiscoveryTask > Ptr;
 
-                ~DiscoveryTask() = default;
+                ~DiscoveryTask();
 
                 DiscoveryTask(const DiscoveryTask&) = delete;
                 DiscoveryTask(DiscoveryTask&&) = delete;
index 007d49c..a44f5d0 100644 (file)
@@ -28,6 +28,8 @@ namespace OIC
         RCSDiscoveryManager::DiscoveryTask::DiscoveryTask(unsigned int id) :
                 m_id { id } {}
 
+        RCSDiscoveryManager::DiscoveryTask::~DiscoveryTask() = default;
+
         bool RCSDiscoveryManager::DiscoveryTask::isCanceled()
         {
             return m_id == RCSDiscoveryManagerImpl::INVALID_ID;