change to use std::move 90/317490/2
authorSukhyungKang <shine.kang@samsung.com>
Wed, 11 Sep 2024 02:34:55 +0000 (11:34 +0900)
committerSukhyungKang <shine.kang@samsung.com>
Thu, 26 Sep 2024 23:31:35 +0000 (08:31 +0900)
Change-Id: Ie3fd00ce43eeb0037bbf0e71e0c9da37284e160c
Signed-off-by: SukhyungKang <shine.kang@samsung.com>
src/widget_service_internal.cc

index d4e7b71372a4e5c8ab33041560df65d60d0c9b8f..7466f0682126f052e54efe7d698fa7d3671c8ea0 100644 (file)
@@ -83,14 +83,14 @@ std::string GetPreviewPath(std::string widget_id,
   }
 
   try {
-    tizen_base::Database db(path, SQLITE_OPEN_READONLY, BusyHandler);
+    tizen_base::Database db(std::move(path), SQLITE_OPEN_READONLY, BusyHandler);
 
     auto q = tizen_base::Database::Sql(
         "SELECT preview FROM support_size WHERE "
         "classid=? AND support_type=?")
         .SetEmptyStringAsNull(true)
-        .Bind(widget_id)
-        .Bind(size_type);
+        .Bind(std::move(widget_id))
+        .Bind(std::move(size_type));
     tizen_base::Database::Result r = db.Exec(q);
     for (const auto& i : r) {
         preview_path = static_cast<std::string>(i.Get(0));
@@ -115,12 +115,12 @@ std::vector<WidgetInfo::SupportSize> GetSupportedSizes(
   }
 
   try {
-    tizen_base::Database db(path, SQLITE_OPEN_READONLY, BusyHandler);
+    tizen_base::Database db(std::move(path), SQLITE_OPEN_READONLY, BusyHandler);
 
     auto q = tizen_base::Database::Sql(
         "SELECT * FROM support_size WHERE classid=?")
         .SetEmptyStringAsNull(true)
-        .Bind(widget_id);
+        .Bind(std::move(widget_id));
     tizen_base::Database::Result r = db.Exec(q);
     for (const auto& i : r) {
         auto [classid, preview, frame, width, height, support_type] =