aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/private
diff options
context:
space:
mode:
authorGravatar cjacek <cjacek@gmail.com>2016-01-25 07:27:36 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-01-25 07:27:36 -0800
commitc721196067b78226b97709998a96e0f037d8fb64 (patch)
tree7497a55cb3e021b7a57d3a3ab74ef98aa128c45d /include/private
parenta273c0f6676b261ef82bc43b0dcc53282f2bdf8c (diff)
Fixed compilation on mingw.
Found and tested in mingw Firefox build. There are two problems: - GCC doesn't support __vectorcall calling convention, so its usage needs to be #ifdefed - GetProcAddress returns FARPROC type (a function pointer) and GCC requires an explicit cast to void* Review URL: https://codereview.chromium.org/1589933002
Diffstat (limited to 'include/private')
-rw-r--r--include/private/SkTLogic.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/include/private/SkTLogic.h b/include/private/SkTLogic.h
index 49fd6c1c7b..a11953705c 100644
--- a/include/private/SkTLogic.h
+++ b/include/private/SkTLogic.h
@@ -45,15 +45,12 @@ template <typename> struct is_function : std::false_type {};
#if !defined(SK_BUILD_FOR_WIN)
template <typename R, typename... Args> struct is_function<R(Args...)> : std::true_type {};
#else
-#if defined(_M_IX86)
template <typename R, typename... Args> struct is_function<R __cdecl (Args...)> : std::true_type {};
+#if defined(_M_IX86)
template <typename R, typename... Args> struct is_function<R __stdcall (Args...)> : std::true_type {};
template <typename R, typename... Args> struct is_function<R __fastcall (Args...)> : std::true_type {};
-#if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2
-template <typename R, typename... Args> struct is_function<R __vectorcall (Args...)> : std::true_type {};
#endif
-#else
-template <typename R, typename... Args> struct is_function<R __cdecl (Args...)> : std::true_type {};
+#if defined(_MSC_VER) && SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2
template <typename R, typename... Args> struct is_function<R __vectorcall (Args...)> : std::true_type {};
#endif
#endif