summaryrefslogtreecommitdiffstats
path: root/include/utils
diff options
context:
space:
mode:
authorKenny Root <kroot@google.com>2010-08-05 16:21:23 -0700
committerKenny Root <kroot@google.com>2010-08-06 09:00:10 -0700
commit818490ab2abe36dfc6c13d01fea5220bd64cca8c (patch)
tree6d4cb2b5e7c04d620b3c5d52b349a600129c3e44 /include/utils
parent5723dfe8c87d0887b8926f43637ed300466890d2 (diff)
downloadframeworks_base-818490ab2abe36dfc6c13d01fea5220bd64cca8c.zip
frameworks_base-818490ab2abe36dfc6c13d01fea5220bd64cca8c.tar.gz
frameworks_base-818490ab2abe36dfc6c13d01fea5220bd64cca8c.tar.bz2
Fix String8::operator+
The LHS was ignored when using: String8 + String8 String8 + (const char*) Add unit tests for above. Bug: 2898473 Change-Id: Ic8fe7be668b665c36aaaa3fc3c3ffdfff0fbba25
Diffstat (limited to 'include/utils')
-rw-r--r--include/utils/String8.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/utils/String8.h b/include/utils/String8.h
index 0b18fe3..4e41410 100644
--- a/include/utils/String8.h
+++ b/include/utils/String8.h
@@ -374,7 +374,7 @@ inline String8& String8::operator+=(const String8& other)
inline String8 String8::operator+(const String8& other) const
{
- String8 tmp;
+ String8 tmp(*this);
tmp += other;
return tmp;
}
@@ -387,7 +387,7 @@ inline String8& String8::operator+=(const char* other)
inline String8 String8::operator+(const char* other) const
{
- String8 tmp;
+ String8 tmp(*this);
tmp += other;
return tmp;
}