optimize operator+ ProString vs. char*

we have all necessary overloads now.

Change-Id: Ic4472eba15d4234e968fcb9443d0f79011aa43fd
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit is contained in:
Oswald Buddenhagen 2016-08-22 16:50:29 +02:00
parent eb19cf15a9
commit f137957e08

View File

@ -208,9 +208,9 @@ inline QString operator+(const QString &one, const ProString &two)
{ return ProString(one) + two; }
inline QString operator+(const ProString &one, const char *two)
{ return one + ProString(two); } // XXX optimize
{ QString ret = one.toQStringRef() + two; ret.detach(); return ret; }
inline QString operator+(const char *one, const ProString &two)
{ return ProString(one) + two; } // XXX optimize
{ QString ret = one + two.toQStringRef(); ret.detach(); return ret; }
inline QString &operator+=(QString &that, const ProString &other)
{ return that += other.toQStringRef(); }