diff options
author | Mike Reed <reed@google.com> | 2018-01-02 17:08:27 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-01-02 22:29:41 +0000 |
commit | 750c78292849e29d36ca302f9c30dac88e7e2a31 (patch) | |
tree | 46c8c12873ca126eb636fb7e98e8851299756ac1 /src/core | |
parent | 9e73f885c7937c8ce8ba51b240cbfa4c13dbe4cf (diff) |
fix skipT to use sizeof T
Bug: skia:
Change-Id: Ifd6d3cfc4499afda763353ceaeecbbb28a97ff2c
Reviewed-on: https://skia-review.googlesource.com/90265
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/SkReadBuffer.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/SkReadBuffer.h b/src/core/SkReadBuffer.h index b061cd93a2..8eb48692a0 100644 --- a/src/core/SkReadBuffer.h +++ b/src/core/SkReadBuffer.h @@ -117,11 +117,11 @@ public: const void* skip(size_t size); const void* skip(size_t count, size_t size); // does safe multiply - template <typename T> const T* skipT(size_t size) { - return static_cast<const T*>(this->skip(size)); + template <typename T> const T* skipT() { + return static_cast<const T*>(this->skip(sizeof(T))); } - template <typename T> const T* skipT(size_t count, size_t size) { - return static_cast<const T*>(this->skip(count, size)); + template <typename T> const T* skipT(size_t count) { + return static_cast<const T*>(this->skip(count, sizeof(T))); } // primitives |