nestedAtrribute createNestedAttribute(int fanSpeed, int airSpeed)
{
- nestedAtrribute *acServer = new nestedAtrribute();
+ nestedAtrribute acServer;
model["model"] = "SamsungAC";
light.push_back(red);
light.push_back(green);
- if (nullptr == acServer)
- {
- dlog_print(DLOG_ERROR, LOG_TAG, "#### NULL nestedAtrribute");
- return *acServer;
- }
-
- acServer->push_back(generalInfo);
- acServer->push_back(fan);
- acServer->push_back(tempSensor);
- acServer->push_back(efficiency);
- acServer->push_back(light);
+ acServer.push_back(generalInfo);
+ acServer.push_back(fan);
+ acServer.push_back(tempSensor);
+ acServer.push_back(efficiency);
+ acServer.push_back(light);
- return *acServer;
+ return acServer;
}
static void onDestroy()
BrokerID ResourceBroker::hostResource(PrimitiveResourcePtr pResource, BrokerCB cb)
{
OIC_LOG_V(DEBUG, BROKER_TAG, "hostResource().");
- if(pResource == nullptr || cb == nullptr || cb == NULL)
+ if(pResource == nullptr || cb == nullptr)
{
throw InvalidParameterException("[hostResource] input parameter(PrimitiveResource or BrokerCB) is Invalid");
}
if (cm == CACHE_METHOD::OBSERVE_ONLY)
{
- if (func == NULL || func == nullptr)
+ if (func == nullptr)
{
throw RCSInvalidParameterException {"[requestResourceCache] CacheCB is invaild"};
}
if (rf != REPORT_FREQUENCY::NONE)
{
- if (func == NULL || func == nullptr)
+ if (func == nullptr)
{
throw RCSInvalidParameterException {"[requestResourceCache] CacheCB is invaild"};
}