Remove gcc-13 build warning [-Wpessimizing-move] 86/302486/1
authorEunki Hong <eunkiki.hong@samsung.com>
Thu, 7 Dec 2023 15:12:47 +0000 (00:12 +0900)
committerEunki Hong <eunkiki.hong@samsung.com>
Thu, 7 Dec 2023 15:12:47 +0000 (00:12 +0900)
/home/leaf/work/dali-toolkit/dali-toolkit/internal/visuals/image-visual-shader-debug.cpp: In function ‘void Dali::Toolkit::Internal::ImageVisualShaderDebug::ApplyImageVisualShaderDebugScriptCode(std::string&)’:
/home/leaf/work/dali-toolkit/dali-toolkit/internal/visuals/image-visual-shader-debug.cpp:289:70: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]
  289 |     RedefineMacro(fragmentShader, std::move(key.stringKey), std::move(value.Get<std::string>()));
      |                                                             ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/leaf/work/dali-toolkit/dali-toolkit/internal/visuals/image-visual-shader-debug.cpp:289:70: note: remove ‘std::mov’ call

Change-Id: I7327933872cca94879b39ab52f904f0d580d29b0
Signed-off-by: Eunki Hong <eunkiki.hong@samsung.com>
dali-toolkit/internal/visuals/image-visual-shader-debug.cpp

index 057d356..9a5cca6 100644 (file)
@@ -286,7 +286,7 @@ void ApplyImageVisualShaderDebugScriptCode(std::string& fragmentShader)
     auto key   = resultMap.GetKeyAt(i);
     auto value = resultMap.GetValue(i);
 
-    RedefineMacro(fragmentShader, std::move(key.stringKey), std::move(value.Get<std::string>()));
+    RedefineMacro(fragmentShader, std::move(key.stringKey), value.Get<std::string>());
   }
 }
 } // namespace ImageVisualShaderDebug