From 3e15f9006cc0a6a9f1f153e87d08149b73531d01 Mon Sep 17 00:00:00 2001 From: cjacek Date: Wed, 10 Sep 2014 14:28:06 -0700 Subject: [PATCH] Fixed void* to uint64_t cast on win64 in TraceID. On win64, long is 32-bit. Found by GCC (mingw-w64) build, where this causes an error. This is the Skia version of https://codereview.chromium.org/374043002 . R=bungeman@google.com, humper@google.com Author: cjacek@gmail.com Review URL: https://codereview.chromium.org/510923002 --- src/core/SkTraceEvent.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/SkTraceEvent.h b/src/core/SkTraceEvent.h index 0c7989f..34e3adf 100644 --- a/src/core/SkTraceEvent.h +++ b/src/core/SkTraceEvent.h @@ -949,7 +949,7 @@ class TraceID { public: explicit DontMangle(const void* id) : data_(static_cast( - reinterpret_cast(id))) {} + reinterpret_cast(id))) {} explicit DontMangle(uint64_t id) : data_(id) {} explicit DontMangle(unsigned int id) : data_(id) {} explicit DontMangle(unsigned short id) : data_(id) {} @@ -992,7 +992,7 @@ class TraceID { TraceID(const void* id, unsigned char* flags) : data_(static_cast( - reinterpret_cast(id))) { + reinterpret_cast(id))) { *flags |= TRACE_EVENT_FLAG_MANGLE_ID; } TraceID(ForceMangle id, unsigned char* flags) : data_(id.data()) { -- 2.7.4