[Android] medialibrary: Fix returning reference to tmp object

Hugo Beauzée-Luyssen git at videolan.org
Fri Apr 24 10:27:00 CEST 2020


vlc-android | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Fri Apr 24 10:04:26 2020 +0200| [bb3e11547ef1df9f3f244102184d40e134cb9a58] | committer: Hugo Beauzée-Luyssen

medialibrary: Fix returning reference to tmp object

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

 medialibrary/jni/AndroidMediaLibrary.cpp | 2 +-
 medialibrary/jni/AndroidMediaLibrary.h   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/medialibrary/jni/AndroidMediaLibrary.cpp b/medialibrary/jni/AndroidMediaLibrary.cpp
index 18ff585b7..096879f0b 100644
--- a/medialibrary/jni/AndroidMediaLibrary.cpp
+++ b/medialibrary/jni/AndroidMediaLibrary.cpp
@@ -549,7 +549,7 @@ AndroidMediaLibrary::groupRemoveId( const int64_t groupId, const int64_t mediaId
     return group != nullptr && group->remove(mediaId);
 }
 
-const std::string&
+std::string
 AndroidMediaLibrary::groupeName( const int64_t groupId )
 {
     const medialibrary::MediaGroupPtr group = p_ml->mediaGroup(groupId);
diff --git a/medialibrary/jni/AndroidMediaLibrary.h b/medialibrary/jni/AndroidMediaLibrary.h
index 54b7605ab..b4d0f0c0c 100644
--- a/medialibrary/jni/AndroidMediaLibrary.h
+++ b/medialibrary/jni/AndroidMediaLibrary.h
@@ -108,7 +108,7 @@ public:
     medialibrary::MediaGroupPtr videoGroup( const int64_t groupId );
     bool groupAddId( const int64_t groupId, const int64_t mediaId );
     bool groupRemoveId( const int64_t groupId, const int64_t mediaId );
-    const std::string& groupeName( const int64_t groupId );
+    std::string groupeName( const int64_t groupId );
     bool groupRename( const int64_t groupId, const std::string& name );
     bool groupUserInteracted(const int64_t groupId );
     int64_t groupDuration(const int64_t groupId );



More information about the Android mailing list