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

Unified Diff: src/pdf/SkPDFTypes.h

Issue 242113010: fix int/size_t warnings (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 8 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 | « src/pdf/SkPDFFont.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFTypes.h
diff --git a/src/pdf/SkPDFTypes.h b/src/pdf/SkPDFTypes.h
index 5ed6386bddc1235d33a9dbcabe65c78a33a8bb6e..1f06c4c5fe63dc4cac3efb5991d066601ee97499 100644
--- a/src/pdf/SkPDFTypes.h
+++ b/src/pdf/SkPDFTypes.h
@@ -392,6 +392,14 @@ public:
*/
void insertInt(const char key[], int32_t value);
+ /**
+ * Calls insertInt() but asserts in debug builds that the value can be represented
+ * by an int32_t.
+ */
+ void insertInt(const char key[], size_t value) {
+ this->insertInt(key, SkToS32(value));
+ }
+
/** Add the scalar to the dictionary with the given key.
* @param key The text of the key for this dictionary entry.
* @param value The scalar value for this dictionary entry.
« no previous file with comments | « src/pdf/SkPDFFont.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698