Remove 16bit asserts and casts of string length.

R=reed@google.com

Review URL: https://codereview.chromium.org/14711011

git-svn-id: http://skia.googlecode.com/svn/trunk@9112 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
bsalomon@google.com 2013-05-13 18:48:40 +00:00
parent 166726b117
commit 8686be2fc3

View File

@ -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