From 8c115cbe234decc9c05b7f8215a2201639aa5c2e Mon Sep 17 00:00:00 2001 From: Niadb <34917535+Niadb@users.noreply.github.com> Date: Fri, 19 Jun 2020 09:48:35 -0600 Subject: [PATCH] Update compiler.h Added a comment explaining the purpose of the WIN_CDECL macro --- lib/common/compiler.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/common/compiler.h b/lib/common/compiler.h index 781ee4351..91bd85e43 100644 --- a/lib/common/compiler.h +++ b/lib/common/compiler.h @@ -38,6 +38,11 @@ #endif +/** + On MSVC qsort requires functions passed to it use the __cdecl calling conversion(CC). + This explictly marks such functions as __cdecl so that the code will still compile + if a CC other than __cdecl has been made the default. +*/ #if defined(_MSC_VER) # define WIN_CDECL __cdecl #else