Bug 1131340 - Avoid delegating constructors since GCC 4.6 lacks support. r=cpearce a=lmandel
authorMatthew Gregan <kinetik@flim.org>
Tue, 10 Feb 2015 12:32:21 +1300
changeset 250202 d102a4ff97be
parent 250201 74fe432c68e8
child 250203 e6af00cdcfe7
push id4521
push usercpearce@mozilla.com
push date2015-03-04 01:22 +0000
treeherdermozilla-beta@8abdbdecd2d6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscpearce, lmandel
bugs1131340
milestone37.0
Bug 1131340 - Avoid delegating constructors since GCC 4.6 lacks support. r=cpearce a=lmandel
dom/media/MediaInfo.h
--- a/dom/media/MediaInfo.h
+++ b/dom/media/MediaInfo.h
@@ -32,37 +32,38 @@ struct TrackInfo {
   nsString mLabel;
   nsString mLanguage;
   bool mEnabled;
 };
 
 // Stores info relevant to presenting media frames.
 class VideoInfo {
 private:
-  VideoInfo(int32_t aWidth, int32_t aHeight, bool aHasVideo)
-    : mDisplay(aWidth, aHeight)
-    , mStereoMode(StereoMode::MONO)
-    , mHasVideo(aHasVideo)
-    , mIsHardwareAccelerated(false)
+  void Init(int32_t aWidth, int32_t aHeight, bool aHasVideo)
   {
+    mDisplay = nsIntSize(aWidth, aHeight);
+    mStereoMode = StereoMode::MONO;
+    mHasVideo = aHasVideo;
+    mIsHardwareAccelerated = false;
+
+    // TODO: TrackInfo should be initialized by its specific codec decoder.
+    // This following call should be removed once we have that implemented.
+    mTrackInfo.Init(NS_LITERAL_STRING("2"), NS_LITERAL_STRING("main"),
+                    EmptyString(), EmptyString(), true);
   }
 
 public:
   VideoInfo()
-    : VideoInfo(0, 0, false)
   {
-    // TODO: TrackInfo should be initialized by its specific codec decoder.
-    // This following call should be removed once we have that implemented.
-    mTrackInfo.Init(NS_LITERAL_STRING("2"), NS_LITERAL_STRING("main"),
-    EmptyString(), EmptyString(), true);
+    Init(0, 0, false);
   }
 
   VideoInfo(int32_t aWidth, int32_t aHeight)
-    : VideoInfo(aWidth, aHeight, true)
   {
+    Init(aWidth, aHeight, true);
   }
 
   // Size in pixels at which the video is rendered. This is after it has
   // been scaled by its aspect ratio.
   nsIntSize mDisplay;
 
   // Indicates the frame layout for single track stereo videos.
   StereoMode mStereoMode;