Bug 1266938 - Add explicit to ctors for helper classes in WidevineVideoDecoder. r=bustage
authorChris Pearce <cpearce@mozilla.com>
Wed, 27 Jul 2016 11:27:08 +1200
changeset 331880 c8261ef537e0591497988faba7e8b3da5bdb65f8
parent 331879 13fe047c4015a86a79e45d42413e9f7f71fddd95
child 331881 02e4e9890b4bd237dfd028a5aa64aad4465147f5
push id9858
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 14:37:10 +0000
treeherdermozilla-aurora@203106ef6cb6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbustage
bugs1266938
milestone50.0a1
Bug 1266938 - Add explicit to ctors for helper classes in WidevineVideoDecoder. r=bustage
dom/media/gmp/widevine-adapter/WidevineVideoDecoder.cpp
--- a/dom/media/gmp/widevine-adapter/WidevineVideoDecoder.cpp
+++ b/dom/media/gmp/widevine-adapter/WidevineVideoDecoder.cpp
@@ -150,17 +150,17 @@ WidevineVideoDecoder::Decode(GMPVideoEnc
     Drain();
   }
 }
 
 // Util class to assist with counting mReturnOutputCallDepth.
 class CounterHelper {
 public:
   // RAII, increment counter
-  CounterHelper(int32_t& counter)
+  explicit CounterHelper(int32_t& counter)
     : mCounter(counter)
   {
     mCounter++;
   }
 
   // RAII, decrement counter
   ~CounterHelper()
   {
@@ -171,17 +171,17 @@ private:
   int32_t& mCounter;
 };
 
 // Util class to make sure GMP frames are freed. Holds a GMPVideoi420Frame*
 // and will destroy it when the helper is destroyed unless the held frame
 // if forgotten with ForgetFrame.
 class FrameDestroyerHelper {
 public:
-  FrameDestroyerHelper(GMPVideoi420Frame*& frame)
+  explicit FrameDestroyerHelper(GMPVideoi420Frame*& frame)
     : frame(frame)
   {
   }
 
   // RAII, destroy frame if held.
   ~FrameDestroyerHelper()
   {
     if (frame) {