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

Unified Diff: Source/platform/fonts/WidthCache.h

Issue 652483002: TextRun::length() should return an unsigned (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 6 years, 2 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: Source/platform/fonts/WidthCache.h
diff --git a/Source/platform/fonts/WidthCache.h b/Source/platform/fonts/WidthCache.h
index a377c9377d068d96266224552ab3b36009b50268..bcbd57c9f966afd6aa554f20c25dc5d24d4c4fa1 100644
--- a/Source/platform/fonts/WidthCache.h
+++ b/Source/platform/fonts/WidthCache.h
@@ -130,7 +130,7 @@ public:
WidthCacheEntry* add(const TextRun& run, WidthCacheEntry entry)
{
- if (static_cast<unsigned>(run.length()) > SmallStringKey::capacity())
+ if (run.length() > SmallStringKey::capacity())
return 0;
if (m_countdown > 0) {
@@ -150,7 +150,7 @@ public:
private:
WidthCacheEntry* addSlowCase(const TextRun& run, WidthCacheEntry entry)
{
- int length = run.length();
+ unsigned length = run.length();
bool isNewEntry;
WidthCacheEntry *value;
if (length == 1) {

Powered by Google App Engine
This is Rietveld 408576698