From: reed@android.com Date: Tue, 14 Apr 2009 15:10:55 +0000 (+0000) Subject: trivial: fix ws X-Git-Tag: accepted/tizen/5.0/unified/20181102.025319~19598 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=304b59e2adefdd1a49929d61dbf19c9453792b4c;p=platform%2Fupstream%2FlibSkiaSharp.git trivial: fix ws git-svn-id: http://skia.googlecode.com/svn/trunk@156 2bbb7eff-a529-9590-31e7-b0007b416f81 --- diff --git a/src/ports/SkFontHost_tables.cpp b/src/ports/SkFontHost_tables.cpp index 4945272..22f4e66 100644 --- a/src/ports/SkFontHost_tables.cpp +++ b/src/ports/SkFontHost_tables.cpp @@ -33,7 +33,7 @@ struct SkSFNTDirEntry { number of tables in the first element of the collection. In either case, if offsetToDir is not-null, set it to the offset to the beginning of the table headers (SkSFNTDirEntry), relative to the start of the stream. - + On an error, return 0 for number of tables, and ignore offsetToDir */ static int count_tables(SkStream* stream, size_t* offsetToDir = NULL) { @@ -44,7 +44,7 @@ static int count_tables(SkStream* stream, size_t* offsetToDir = NULL) { // by default, SkSFNTHeader is at the start of the stream size_t offset = 0; - + // if we're really a collection, the first 4-bytes will be 'ttcf' uint32_t tag = SkEndian_SwapBE32(shared.fCollection.fTag); if (SkSetFourByteTag('t', 't', 'c', 'f') == tag) { @@ -61,7 +61,7 @@ static int count_tables(SkStream* stream, size_t* offsetToDir = NULL) { return 0; } } - + if (offsetToDir) { // add the size of the header, so we will point to the DirEntries *offsetToDir = offset + sizeof(SkSFNTDirEntry); @@ -78,7 +78,7 @@ struct SfntHeader { /** If it returns true, then fCount and fDir are properly initialized. Note: fDir will point to the raw array of SkSFNTDirEntry values, meaning they will still be in the file's native endianness (BE). - + fDir will be automatically freed when this object is destroyed */ bool init(SkStream* stream) {