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

Unified Diff: source/test/letest/PortableFontInstance.cpp

Issue 1621843002: ICU 56 update step 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@561
Patch Set: Created 4 years, 11 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 | « source/test/letest/PortableFontInstance.h ('k') | source/test/letest/SimpleFontInstance.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/test/letest/PortableFontInstance.cpp
diff --git a/source/test/letest/PortableFontInstance.cpp b/source/test/letest/PortableFontInstance.cpp
index abbd8ee60773b0c73566632b27f558dbcb2e3333..5c968b2545de3682332319bd6d8afdfdf3a23c87 100644
--- a/source/test/letest/PortableFontInstance.cpp
+++ b/source/test/letest/PortableFontInstance.cpp
@@ -1,7 +1,7 @@
/*
*******************************************************************************
*
- * Copyright (C) 1999-2013, International Business Machines
+ * Copyright (C) 1999-2015, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
@@ -97,7 +97,8 @@ PortableFontInstance::PortableFontInstance(const char *fileName, float pointSize
// read in the directory
SFNTDirectory tempDir;
- fread(&tempDir, sizeof tempDir, 1, fFile);
+ size_t numRead = fread(&tempDir, sizeof tempDir, 1, fFile);
+ (void)numRead;
le_int32 dirSize = sizeof tempDir + ((SWAPW(tempDir.numTables) - ANY_NUMBER) * sizeof(DirectoryEntry));
const LETag headTag = LE_HEAD_TABLE_TAG;
@@ -116,7 +117,7 @@ PortableFontInstance::PortableFontInstance(const char *fileName, float pointSize
}
fseek(fFile, 0L, SEEK_SET);
- fread((void *) fDirectory, sizeof(char), dirSize, fFile);
+ numRead = fread((void *) fDirectory, sizeof(char), dirSize, fFile);
//
// We calculate these numbers 'cause some fonts
@@ -242,18 +243,13 @@ const void *PortableFontInstance::readTable(LETag tag, le_uint32 *length) const
if (table != NULL) {
fseek(fFile, SWAPL(entry->offset), SEEK_SET);
- fread(table, sizeof(char), *length, fFile);
+ size_t numRead = fread(table, sizeof(char), *length, fFile);
+ (void)numRead;
}
return table;
}
-const void *PortableFontInstance::getFontTable(LETag tableTag) const
-{
- size_t ignored;
- return getFontTable(tableTag, ignored);
-}
-
const void *PortableFontInstance::getFontTable(LETag tableTag, size_t &length) const
{
return FontTableCache::find(tableTag, length);
« no previous file with comments | « source/test/letest/PortableFontInstance.h ('k') | source/test/letest/SimpleFontInstance.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698