aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pdf/SkPDFTypes.h
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-04-18 19:29:07 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-04-18 19:29:07 +0000
commitaec406650cbfa4ef65d83db5ff4f82572e8e098f (patch)
treedfc4bd1845a09779496bef36e89f6aefd8c91361 /src/pdf/SkPDFTypes.h
parent770963f23f4fc313db0fa3bac18b1b8aafb55f17 (diff)
fix int/size_t warnings
patch from issue 239933002 BUG=skia: R=bungeman@google.com Review URL: https://codereview.chromium.org/242113010 git-svn-id: http://skia.googlecode.com/svn/trunk@14259 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/pdf/SkPDFTypes.h')
-rw-r--r--src/pdf/SkPDFTypes.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/pdf/SkPDFTypes.h b/src/pdf/SkPDFTypes.h
index 5ed6386bdd..1f06c4c5fe 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.