fix deep copy of the vector. 47/243547/2
authorSubhransu Mohanty <sub.mohanty@samsung.com>
Tue, 8 Sep 2020 03:26:54 +0000 (12:26 +0900)
committerSubhransu Mohanty <sub.mohanty@samsung.com>
Tue, 8 Sep 2020 04:09:23 +0000 (13:09 +0900)
as the function returns the vector by const& and our temporary
object dosen't match the return type we make a deep copy of the vector.

Change-Id: Ie402d85962b138ed08bf00cbb3a8453190b8f812

dali/internal/render/renderers/render-renderer.cpp

index 80449e8..700cdae 100644 (file)
@@ -703,8 +703,7 @@ bool Renderer::Updated(BufferIndex bufferIndex, const SceneGraph::NodeDataProvid
     return true;
   }
 
-  std::vector<Render::Texture*> textures = mRenderDataProvider->GetTextures();
-  for (Render::Texture* texture : textures)
+  for( const auto& texture : mRenderDataProvider->GetTextures() )
   {
     if (texture && texture->IsNativeImage())
     {