aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/opts/SkChecksum_opts.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/opts/SkChecksum_opts.h')
-rw-r--r--src/opts/SkChecksum_opts.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/opts/SkChecksum_opts.h b/src/opts/SkChecksum_opts.h
index 90e7af0d96..3f2ef39c57 100644
--- a/src/opts/SkChecksum_opts.h
+++ b/src/opts/SkChecksum_opts.h
@@ -19,11 +19,11 @@
namespace SK_OPTS_NS {
-template <typename T>
-static inline T unaligned_load(const uint8_t* src) {
- T val;
- memcpy(&val, src, sizeof(val));
- return val;
+template <typename T, typename P>
+static inline T unaligned_load(const P* p) {
+ T v;
+ memcpy(&v, p, sizeof(v));
+ return v;
}
#if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE42 && (defined(__x86_64__) || defined(_M_X64))