[vlc-commits] mkv: remove deprecated std function

Alexandre Janniaux git at videolan.org
Mon Jan 20 09:18:38 CET 2020


vlc | branch: master | Alexandre Janniaux <ajanni at videolabs.io> | Wed Dec 11 11:57:13 2019 +0100| [6fce792e89c8f3879705d0fc52caa43f699d5393] | committer: Hugo Beauzée-Luyssen

mkv: remove deprecated std function

std::mem_fun and std::bind2nd have been deprecated in C++11 and will be
removed in C++17. They were replaced by std::mem_fn and std::bind which
are easier to use.

Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

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

 modules/demux/mkv/chapters.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/demux/mkv/chapters.cpp b/modules/demux/mkv/chapters.cpp
index 8d9f5da899..3d69da52df 100644
--- a/modules/demux/mkv/chapters.cpp
+++ b/modules/demux/mkv/chapters.cpp
@@ -147,13 +147,14 @@ bool chapter_item_c::EnterLeaveHelper_ ( bool do_subs,
     bool f_result = false;
 
     f_result |= std::count_if ( codecs.begin (), codecs.end (),
-      std::mem_fun (co_cb)
+      std::mem_fn (co_cb)
     );
 
     if ( do_subs )
     {
+        using std::placeholders::_1;
         f_result |= count_if ( sub_chapters.begin (), sub_chapters.end (),
-          std::bind2nd( std::mem_fun( ch_cb ), true )
+          std::bind( std::mem_fn( ch_cb ), _1, true )
         );
     }
 



More information about the vlc-commits mailing list