Bug 1329243 - Fix nsAdoptingString -Wextra copy constructor warning; r?froydnj
MozReview-Commit-ID: DEicxRecJUu
--- 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);