[vlc-commits] misc: medialibrary: use istringstream if possible

Filip Roséen git at videolan.org
Fri Jul 20 11:12:11 CEST 2018


vlc | branch: master | Filip Roséen <filip at atch.se> | Fri Jul 20 04:08:35 2018 +0200| [182258715db3c15886b2932eb797634b420557a0] | committer: Hugo Beauzée-Luyssen

misc: medialibrary: use istringstream if possible

The code in question does not need the capabilities of
std::ostringstream, as such std::istringstream is enough.

(cherry picked from commit d8e98d40eb1c33a4c331204028c4a94d86a323be)
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=182258715db3c15886b2932eb797634b420557a0
---

 modules/misc/medialibrary/medialib.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/misc/medialibrary/medialib.cpp b/modules/misc/medialibrary/medialib.cpp
index 191411c99e..4c61025502 100644
--- a/modules/misc/medialibrary/medialib.cpp
+++ b/modules/misc/medialibrary/medialib.cpp
@@ -217,7 +217,7 @@ bool MediaLibrary::Start()
     auto folders = vlc::wrap_cptr( var_InheritString( m_obj, "ml-folders" ) );
     if ( folders != nullptr && strlen( folders.get() ) > 0 )
     {
-        std::stringstream ss( folders.get() );
+        std::istringstream ss( folders.get() );
         std::string folder;
         while ( std::getline( ss, folder, ';' ) )
             ml->discover( folder );



More information about the vlc-commits mailing list