Fixed build issue by implicitly capture by reference (of Scene)
authorPhilippe Coval <philippe.coval@osg.samsung.com>
Mon, 7 Mar 2016 10:58:19 +0000 (11:58 +0100)
committerHabib Virji <habib.virji@samsung.com>
Wed, 9 Mar 2016 15:57:05 +0000 (15:57 +0000)
commit09bb2523e0c99b55de291ab80bcdc482ff8388d2
treecf15fa2047564fcff082ad5f52e13e477b94afb3
parent063c8af1f50262a9d068138d485221189945328d
Fixed build issue by implicitly capture by reference (of Scene)

Problem was observed while building on Tizen:2.4:Mobile (g++ 4.9.2):

    error: capture of non-variable 'OIC::Service::Scene::m_name'
    [&actions, &m_name](const SceneMemberResource::Ptr& member)

Futher explanation from Thiago Macieira <thiago.macieira@intel.com> :

  Looking up the C++ standard, it says that :
  "An entity that is designated by a simple-capture [...]
  shall be this or a variable with automatic storage duration".
  That means you cannot capture non-static members by name and you
  have to capture the whole object.
  Using [&] accomplishes capturing of "this".

Change-Id: Id9db9ca55b858b5c39cee48a5eb9b25ad9e59b41
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/5497
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Habib Virji <habib.virji@samsung.com>
service/scene-manager/src/Scene.cpp