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

Unified Diff: src/ots.h

Issue 14758005: [OTS] Fix WOFF2 decode error (Closed) Base URL: http://ots.googlecode.com/svn/trunk/
Patch Set: Created 7 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
« no previous file with comments | « no previous file | src/woff2.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ots.h
===================================================================
--- src/ots.h (revision 100)
+++ src/ots.h (working copy)
@@ -173,6 +173,13 @@
return (value + 3) & ~3;
}
+template<typename T> T Round2(T value) {
+ if (value == std::numeric_limits<T>::max()) {
+ return value;
+ }
+ return (value + 1) & ~1;
+}
+
bool IsValidVersionTag(uint32_t tag);
#define FOR_EACH_TABLE_TYPE \
« no previous file with comments | « no previous file | src/woff2.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698