mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 01:48:05 +00:00
Bug 1481097 - xpcom: Remove nsTString literal string workaround for gcc 4.9 bug. r=nika
This gcc 4.9 workaround (from bug 1377351) is no longer needed because Firefox currently requires gcc 6.1 or later (as of bug 1444274). MozReview-Commit-ID: 9R14BDzWEoj --HG-- extra : rebase_source : a56ec3ee321cdc76e704fe33c2c4a5b85b558889 extra : source : e0c26ec11d499058e51bc2c3d06b2e1840e77f13
This commit is contained in:
parent
7ce09e1fd8
commit
02588f7a04
@ -38,8 +38,6 @@ public:
|
||||
typedef typename nsTSubstring<T>::substring_type substring_type;
|
||||
#endif
|
||||
|
||||
typedef typename substring_type::literalstring_type literalstring_type;
|
||||
|
||||
typedef typename substring_type::fallible_t fallible_t;
|
||||
|
||||
typedef typename substring_type::char_type char_type;
|
||||
@ -123,15 +121,6 @@ public:
|
||||
this->Assign(std::move(aReadable));
|
||||
}
|
||||
|
||||
// NOTE(nika): gcc 4.9 workaround. Remove when support is dropped.
|
||||
explicit
|
||||
nsTString(const literalstring_type& aReadable)
|
||||
: substring_type(ClassFlags::NULL_TERMINATED)
|
||||
{
|
||||
this->Assign(aReadable);
|
||||
}
|
||||
|
||||
|
||||
// |operator=| does not inherit, so we must define our own
|
||||
self_type& operator=(char_type aChar)
|
||||
{
|
||||
@ -171,12 +160,6 @@ public:
|
||||
this->Assign(std::move(aStr));
|
||||
return *this;
|
||||
}
|
||||
// NOTE(nika): gcc 4.9 workaround. Remove when support is dropped.
|
||||
self_type& operator=(const literalstring_type& aStr)
|
||||
{
|
||||
this->Assign(aStr);
|
||||
return *this;
|
||||
}
|
||||
self_type& operator=(const substring_tuple_type& aTuple)
|
||||
{
|
||||
this->Assign(aTuple);
|
||||
@ -570,7 +553,6 @@ public:
|
||||
typedef typename base_string_type::substring_type substring_type;
|
||||
typedef typename base_string_type::size_type size_type;
|
||||
typedef typename base_string_type::substring_tuple_type substring_tuple_type;
|
||||
typedef typename base_string_type::literalstring_type literalstring_type;
|
||||
|
||||
// These are only for internal use within the string classes:
|
||||
typedef typename base_string_type::DataFlags DataFlags;
|
||||
@ -640,14 +622,6 @@ public:
|
||||
this->Assign(std::move(aStr));
|
||||
}
|
||||
|
||||
// NOTE(nika): gcc 4.9 workaround. Remove when support is dropped.
|
||||
explicit
|
||||
nsTAutoStringN(const literalstring_type& aStr)
|
||||
: self_type()
|
||||
{
|
||||
this->Assign(aStr);
|
||||
}
|
||||
|
||||
MOZ_IMPLICIT nsTAutoStringN(const substring_tuple_type& aTuple)
|
||||
: self_type()
|
||||
{
|
||||
@ -693,12 +667,6 @@ public:
|
||||
this->Assign(std::move(aStr));
|
||||
return *this;
|
||||
}
|
||||
// NOTE(nika): gcc 4.9 workaround. Remove when support is dropped.
|
||||
self_type& operator=(const literalstring_type& aStr)
|
||||
{
|
||||
this->Assign(aStr);
|
||||
return *this;
|
||||
}
|
||||
self_type& operator=(const substring_tuple_type& aTuple)
|
||||
{
|
||||
this->Assign(aTuple);
|
||||
|
@ -15,7 +15,6 @@
|
||||
#include "nsCharTraits.h"
|
||||
|
||||
template <typename T> class nsTSubstringTuple;
|
||||
template <typename T> class nsTLiteralString;
|
||||
|
||||
// The base for string comparators
|
||||
template <typename T> class nsTStringComparator
|
||||
@ -107,7 +106,6 @@ public:
|
||||
|
||||
typedef nsTSubstring<T> substring_type;
|
||||
typedef nsTSubstringTuple<T> substring_tuple_type;
|
||||
typedef nsTLiteralString<T> literalstring_type;
|
||||
|
||||
typedef nsReadingIterator<char_type> const_iterator;
|
||||
typedef nsWritingIterator<char_type> iterator;
|
||||
|
@ -532,14 +532,6 @@ nsTSubstring<T>::Assign(self_type&& aStr, const fallible_t& aFallible)
|
||||
return true;
|
||||
}
|
||||
|
||||
// NOTE(nika): gcc 4.9 workaround. Remove when support is dropped.
|
||||
template <typename T>
|
||||
void
|
||||
nsTSubstring<T>::Assign(const literalstring_type& aStr)
|
||||
{
|
||||
Assign(aStr.AsString());
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void
|
||||
nsTSubstring<T>::Assign(const substring_tuple_type& aTuple)
|
||||
|
@ -46,7 +46,6 @@ public:
|
||||
|
||||
typedef typename mozilla::detail::nsTStringRepr<T> base_string_type;
|
||||
typedef typename base_string_type::substring_type substring_type;
|
||||
typedef typename base_string_type::literalstring_type literalstring_type;
|
||||
|
||||
typedef typename base_string_type::fallible_t fallible_t;
|
||||
|
||||
@ -188,13 +187,6 @@ public:
|
||||
void NS_FASTCALL Assign(self_type&&);
|
||||
MOZ_MUST_USE bool NS_FASTCALL Assign(self_type&&, const fallible_t&);
|
||||
|
||||
// XXX(nika): GCC 4.9 doesn't correctly resolve calls to Assign a
|
||||
// nsLiteralCString into a nsTSubstring, due to a frontend bug. This explcit
|
||||
// Assign overload (and the corresponding constructor and operator= overloads)
|
||||
// are used to avoid this bug. Once we stop supporting GCC 4.9 we can remove
|
||||
// them.
|
||||
void NS_FASTCALL Assign(const literalstring_type&);
|
||||
|
||||
void NS_FASTCALL Assign(const substring_tuple_type&);
|
||||
MOZ_MUST_USE bool NS_FASTCALL Assign(const substring_tuple_type&,
|
||||
const fallible_t&);
|
||||
@ -284,12 +276,6 @@ public:
|
||||
Assign(std::move(aStr));
|
||||
return *this;
|
||||
}
|
||||
// NOTE(nika): gcc 4.9 workaround. Remove when support is dropped.
|
||||
self_type& operator=(const literalstring_type& aStr)
|
||||
{
|
||||
Assign(aStr);
|
||||
return *this;
|
||||
}
|
||||
self_type& operator=(const substring_tuple_type& aTuple)
|
||||
{
|
||||
Assign(aTuple);
|
||||
|
Loading…
Reference in New Issue
Block a user