Bug 1267524 Part 13 - Use member initializer list for nsStyleTextReset. draft
authorTing-Yu Lin <tlin@mozilla.com>
Tue, 03 May 2016 17:26:29 +0800
changeset 362882 7b3736b3a7bafd05bae4ffb272c0d64ff58c67f5
parent 362881 32d5dde75a25d8a48fb75827ac4d1d66c9cb4b63
child 362883 217eb359e3849cfa43455efe1913b3e08e1c2fd5
push id17052
push usertlin@mozilla.com
push dateTue, 03 May 2016 12:58:06 +0000
bugs1267524
milestone49.0a1
Bug 1267524 Part 13 - Use member initializer list for nsStyleTextReset. MozReview-Commit-ID: GqlFSXXCSZ9
layout/style/nsStyleStruct.cpp
--- a/layout/style/nsStyleStruct.cpp
+++ b/layout/style/nsStyleStruct.cpp
@@ -3497,27 +3497,27 @@ nsresult nsStyleContent::AllocateContent
 }
 
 
 // --------------------
 // nsStyleTextReset
 //
 
 nsStyleTextReset::nsStyleTextReset(StyleStructContext aContext)
-{ 
+  : mTextDecorationLine(NS_STYLE_TEXT_DECORATION_LINE_NONE)
+  , mUnicodeBidi(NS_STYLE_UNICODE_BIDI_NORMAL)
+  , mTextDecorationStyle(NS_STYLE_TEXT_DECORATION_STYLE_SOLID |
+                         BORDER_COLOR_FOREGROUND)
+  , mTextDecorationColor(NS_RGB(0, 0, 0))
+{
   MOZ_COUNT_CTOR(nsStyleTextReset);
-  mTextDecorationLine = NS_STYLE_TEXT_DECORATION_LINE_NONE;
-  mTextDecorationColor = NS_RGB(0,0,0);
-  mTextDecorationStyle =
-    NS_STYLE_TEXT_DECORATION_STYLE_SOLID | BORDER_COLOR_FOREGROUND;
-  mUnicodeBidi = NS_STYLE_UNICODE_BIDI_NORMAL;
 }
 
-nsStyleTextReset::nsStyleTextReset(const nsStyleTextReset& aSource) 
-{ 
+nsStyleTextReset::nsStyleTextReset(const nsStyleTextReset& aSource)
+{
   MOZ_COUNT_CTOR(nsStyleTextReset);
   *this = aSource;
 }
 
 nsStyleTextReset::~nsStyleTextReset(void)
 {
   MOZ_COUNT_DTOR(nsStyleTextReset);
 }