From: Markus Jung Date: Mon, 3 Aug 2015 09:36:18 +0000 (+0900) Subject: Gcc fix for SoftSensorResource, ResourceClientTest X-Git-Tag: 1.0.0-RC1~201 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=619b79673da18cbb0af6eaa4e24ee8dfb7a18290;p=contrib%2Fiotivity.git Gcc fix for SoftSensorResource, ResourceClientTest Added algorithm header file and conditionvariable header file Change-Id: I4db4ad7d9079973925ecbcd558ffe3ded1f581d4 Signed-off-by: Markus Jung Reviewed-on: https://gerrit.iotivity.org/gerrit/2060 Reviewed-by: Madan Lanka Tested-by: Madan Lanka --- diff --git a/service/resource-encapsulation/src/resourceContainer/examples/SoftSensorSampleBundle/src/SoftSensorBundleActivator.cpp b/service/resource-encapsulation/src/resourceContainer/examples/SoftSensorSampleBundle/src/SoftSensorBundleActivator.cpp index 77b618f..c45cb7b 100644 --- a/service/resource-encapsulation/src/resourceContainer/examples/SoftSensorSampleBundle/src/SoftSensorBundleActivator.cpp +++ b/service/resource-encapsulation/src/resourceContainer/examples/SoftSensorSampleBundle/src/SoftSensorBundleActivator.cpp @@ -20,6 +20,7 @@ #include "SoftSensorBundleActivator.h" #include "DiscomfortIndexSensorResource.h" +#include SoftSensorBundleActivator *bundle; @@ -113,4 +114,4 @@ extern "C" void externalCreateResource(resourceInfo resourceInfo) extern "C" void externalDestroyResource(BundleResource *pBundleResource) { bundle->destroyResource(pBundleResource); -} \ No newline at end of file +} diff --git a/service/resource-encapsulation/src/resourceContainer/src/SoftSensorResource.cpp b/service/resource-encapsulation/src/resourceContainer/src/SoftSensorResource.cpp index 5178384..7767e11 100644 --- a/service/resource-encapsulation/src/resourceContainer/src/SoftSensorResource.cpp +++ b/service/resource-encapsulation/src/resourceContainer/src/SoftSensorResource.cpp @@ -19,6 +19,7 @@ //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= #include "SoftSensorResource.h" +#include using namespace OIC::Service; namespace OIC @@ -60,11 +61,9 @@ namespace OIC void SoftSensorResource::setAttribute(std::string key, RCSResourceAttributes::Value &&value) { - std::list::iterator itor = std::find(m_inputList.begin(), m_inputList.end(), key); - BundleResource::setAttribute(key, value.toString()); - if (itor != m_inputList.end()) + if (std::find(m_inputList.begin(), m_inputList.end(), key) != m_inputList.end()) executeLogic(); } diff --git a/service/resource-encapsulation/unittests/ResourceClientTest.cpp b/service/resource-encapsulation/unittests/ResourceClientTest.cpp index 9486e90..c51d1a5 100644 --- a/service/resource-encapsulation/unittests/ResourceClientTest.cpp +++ b/service/resource-encapsulation/unittests/ResourceClientTest.cpp @@ -23,6 +23,7 @@ #include "RCSDiscoveryManager.h" #include "RCSResourceObject.h" #include "PrimitiveResource.h" +#include #include