[vlc-commits] demux/adaptive: NearOptimalAdaptionLogic: use mem-initalizer-list

Filip Roséen git at videolan.org
Thu May 18 21:08:58 CEST 2017


vlc | branch: master | Filip Roséen <filip at atch.se> | Thu May 18 17:07:31 2017 +0200| [dd0da7daa3f7d3aff263fa4c61cd22022a3a16c6] | committer: Jean-Baptiste Kempf

demux/adaptive: NearOptimalAdaptionLogic: use mem-initalizer-list

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 .../adaptive/logic/NearOptimalAdaptationLogic.cpp  | 23 +++++++++++-----------
 1 file changed, 11 insertions(+), 12 deletions(-)

diff --git a/modules/demux/adaptive/logic/NearOptimalAdaptationLogic.cpp b/modules/demux/adaptive/logic/NearOptimalAdaptationLogic.cpp
index 5ee5de0b47..2a3a829530 100644
--- a/modules/demux/adaptive/logic/NearOptimalAdaptationLogic.cpp
+++ b/modules/demux/adaptive/logic/NearOptimalAdaptationLogic.cpp
@@ -44,19 +44,18 @@ using namespace adaptive;
 #define bufferTargetS  (CLOCK_FREQ * 30) /* Qmax */
 
 NearOptimalContext::NearOptimalContext()
+    : buffering_min( minimumBufferS )
+    , buffering_level( 0 )
+    , buffering_target( bufferTargetS )
+    , last_download_rate( 0 )
+{ }
+
+NearOptimalAdaptationLogic::NearOptimalAdaptationLogic( vlc_object_t *p_obj )
+    : AbstractAdaptationLogic()
+    , p_obj( p_obj )
+    , usedBps( 0 )
+    , currentBps( 0 )
 {
-    buffering_min = minimumBufferS;
-    buffering_level = 0;
-    buffering_target = bufferTargetS;
-    last_download_rate = 0;
-}
-
-NearOptimalAdaptationLogic::NearOptimalAdaptationLogic(vlc_object_t *p_obj_):
-    AbstractAdaptationLogic()
-{
-    p_obj = p_obj_;
-    usedBps = 0;
-    currentBps = 0;
     vlc_mutex_init(&lock);
 }
 



More information about the vlc-commits mailing list