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

Unified Diff: third_party/WebKit/Source/platform/fonts/shaping/ShapeCache.h

Issue 2018253002: Change TextRun's length() and charactersLength() to return an unsigned (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and remove one static_cast added in r396668 Created 4 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
Index: third_party/WebKit/Source/platform/fonts/shaping/ShapeCache.h
diff --git a/third_party/WebKit/Source/platform/fonts/shaping/ShapeCache.h b/third_party/WebKit/Source/platform/fonts/shaping/ShapeCache.h
index 5d44f6573192566b054eb3a6dcb0ab89b11cf9e8..df556230ef2df0ce4520c92a5cfa259d030dd4e3 100644
--- a/third_party/WebKit/Source/platform/fonts/shaping/ShapeCache.h
+++ b/third_party/WebKit/Source/platform/fonts/shaping/ShapeCache.h
@@ -137,7 +137,7 @@ public:
ShapeCacheEntry* add(const TextRun& run, ShapeCacheEntry entry)
{
- if (static_cast<unsigned>(run.length()) > SmallStringKey::capacity())
+ if (run.length() > SmallStringKey::capacity())
return 0;
return addSlowCase(run, entry);
@@ -182,7 +182,7 @@ public:
private:
ShapeCacheEntry* addSlowCase(const TextRun& run, ShapeCacheEntry entry)
{
- int length = run.length();
+ unsigned length = run.length();
bool isNewEntry;
ShapeCacheEntry *value;
if (length == 1) {

Powered by Google App Engine
This is Rietveld 408576698