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

Unified Diff: src/core/SkString.cpp

Issue 14711011: Remove 16bit asserts and casts of string length. (Closed) Base URL: https://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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkString.cpp
diff --git a/src/core/SkString.cpp b/src/core/SkString.cpp
index aee3de5dd84d695911a1f19f61efb64227cf49c6..a069a7e68a0c5dbc31e788771834db6fb4cbd3a6 100644
--- a/src/core/SkString.cpp
+++ b/src/core/SkString.cpp
@@ -239,9 +239,7 @@ SkString::SkString() : fRec(const_cast<Rec*>(&gEmptyRec)) {
}
SkString::SkString(size_t len) {
- SkASSERT(SkToU16(len) == len); // can't handle larger than 64K
-
- fRec = AllocRec(NULL, (U16CPU)len);
+ fRec = AllocRec(NULL, len);
#ifdef SK_DEBUG
fStr = fRec->data();
#endif
@@ -250,14 +248,14 @@ SkString::SkString(size_t len) {
SkString::SkString(const char text[]) {
size_t len = text ? strlen(text) : 0;
- fRec = AllocRec(text, (U16CPU)len);
+ fRec = AllocRec(text, len);
#ifdef SK_DEBUG
fStr = fRec->data();
#endif
}
SkString::SkString(const char text[], size_t len) {
- fRec = AllocRec(text, (U16CPU)len);
+ fRec = AllocRec(text, len);
#ifdef SK_DEBUG
fStr = fRec->data();
#endif
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698