Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Unified Diff: include/core/SkString.h

Issue 14813013: add SkString::append(const char c) (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/StringTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkString.h
===================================================================
--- include/core/SkString.h (revision 9077)
+++ include/core/SkString.h (working copy)
@@ -168,6 +168,7 @@
void insertScalar(size_t offset, SkScalar);
void append(const SkString& str) { this->insert((size_t)-1, str); }
+ void append(const char c) { this->insert((size_t)-1, &c, 1); }
void append(const char text[]) { this->insert((size_t)-1, text); }
void append(const char text[], size_t len) { this->insert((size_t)-1, text, len); }
void appendUnichar(SkUnichar uni) { this->insertUnichar((size_t)-1, uni); }
@@ -194,7 +195,7 @@
SkString& operator+=(const SkString& s) { this->append(s); return *this; }
SkString& operator+=(const char text[]) { this->append(text); return *this; }
- SkString& operator+=(const char c) { this->append(&c, 1); return *this; }
+ SkString& operator+=(const char c) { this->append(c); return *this; }
/**
* Swap contents between this and other. This function is guaranteed
« no previous file with comments | « no previous file | tests/StringTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698