Bug 1329243 - Fix nsAdoptingString -Wextra copy constructor warning; r?froydnj draft
authorVincent Lequertier <vi.le@autistici.org>
Mon, 23 Jan 2017 20:50:01 +0100
changeset 468240 acba77a79acc74cf30c1a32b470460c78705719a
parent 458771 2963cf6be7f830c0d2155e2968cfc53585868a76
child 489934 b6806a50ddbac812c2aec3dfb3bce24fb8964e3a
child 489937 c04608c7d740d7938e2249e9f557971c06cd9b89
push id43394
push userbmo:vi.le@autistici.org
push dateMon, 30 Jan 2017 22:54:48 +0000
reviewersfroydnj
bugs1329243
milestone53.0a1
Bug 1329243 - Fix nsAdoptingString -Wextra copy constructor warning; r?froydnj MozReview-Commit-ID: DEicxRecJUu
xpcom/string/nsTString.h
--- a/xpcom/string/nsTString.h
+++ b/xpcom/string/nsTString.h
@@ -851,16 +851,17 @@ public:
     Adopt(aStr, aLength);
   }
 
   // copy-constructor required to adopt on copy. Note that this
   // will violate the constness of |aStr| in the operator=()
   // call. |aStr| will be truncated as a side-effect of this
   // constructor.
   nsTAdoptingString_CharT(const self_type& aStr)
+    : nsTXPIDLString_CharT()
   {
     *this = aStr;
   }
 
   // |operator=| does not inherit, so we must define our own
   self_type& operator=(const substring_type& aStr)
   {
     Assign(aStr);