[Android] medialibrary: Save a couple copies of std::set

Hugo Beauzée-Luyssen git at videolan.org
Mon Sep 27 09:18:54 UTC 2021


vlc-android | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Fri Sep 24 15:29:25 2021 +0200| [efc5c129f8e69835a7b1b044c79ad6b83f7dc6e4] | committer: Nicolas Pomepuy

medialibrary: Save a couple copies of std::set

> https://code.videolan.org/videolan/vlc-android/commit/efc5c129f8e69835a7b1b044c79ad6b83f7dc6e4
---

 medialibrary/jni/AndroidMediaLibrary.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/medialibrary/jni/AndroidMediaLibrary.cpp b/medialibrary/jni/AndroidMediaLibrary.cpp
index e7dd12b2c..26ed48d6e 100644
--- a/medialibrary/jni/AndroidMediaLibrary.cpp
+++ b/medialibrary/jni/AndroidMediaLibrary.cpp
@@ -735,7 +735,7 @@ void AndroidMediaLibrary::onMediaDeleted( std::set<int64_t> ids )
     {
         JNIEnv *env = getEnv();
         if (env != NULL && weak_thiz) {
-            auto results = idArray(env, ids);
+            auto results = idArray(env, std::move(ids));
             env->CallVoidMethod(weak_thiz, p_fields->MediaLibrary.onMediaDeletedId, results.get());
         }
     }
@@ -747,7 +747,7 @@ void AndroidMediaLibrary::onMediaConvertedToExternal( std::set<int64_t> ids )
     {
         JNIEnv *env = getEnv();
         if (env != NULL && weak_thiz) {
-            auto results = idArray(env, ids);
+            auto results = idArray(env, std::move(ids));
             env->CallVoidMethod(weak_thiz, p_fields->MediaLibrary.onMediaConvertedToExternalId, results.get());
         }
     }



More information about the Android mailing list