[Convergence] Fix for temporary object returned 47/128547/1
authorTomasz Marciniak <t.marciniak@samsung.com>
Wed, 10 May 2017 10:00:56 +0000 (12:00 +0200)
committerTomasz Marciniak <t.marciniak@samsung.com>
Wed, 10 May 2017 10:00:56 +0000 (12:00 +0200)
[Bug] rvalue objects were returned instead of
reference to picojson string.

[Verification] Code compiles.

Change-Id: Iee750c9bd00699c76808e7a6cf268221916a0f7d
Signed-off-by: Tomasz Marciniak <t.marciniak@samsung.com>
src/convergence/convergence_remote_app_control_service.cc

index cdd1716..7116645 100644 (file)
@@ -520,7 +520,7 @@ TizenResult ConvergenceRemoteAppControlService::ApplicationControlDataToServiceE
   size_t i = 0;
 
   for (auto iter = value.begin(); iter != value.end(); ++iter, ++i) {
-    arr[i] = iter->to_str().c_str();
+    arr[i] = iter->get<std::string>().c_str();
   }
 
   if (1 == size) {