specify __thiscall

According to https://docs.microsoft.com/en-us/cpp/cpp/thiscall?view=vs-2019, "on ARM and x64 machines, __thiscall is accepted and ignored by the compiler.". So it should be OK to specify this for all win32
develop
Jeremy Apthorp 2019-12-12 17:51:41 -08:00 committed by GitHub
parent 9a37849603
commit dfab521a71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

@ -541,7 +541,13 @@ string Units::getRaceName(df::unit* unit)
return getRaceNameById(unit->race); return getRaceNameById(unit->race);
} }
typedef void (*df_unit_physical_description_fn)(df::unit*, string*); #ifdef _WIN32
#define THISCALL __thiscall
#else
#define THISCALL
#endif
typedef void (THISCALL *df_unit_physical_description_fn)(df::unit*, string*);
void df_unit_physical_description(df::unit* unit, string* out_str) void df_unit_physical_description(df::unit* unit, string* out_str)
{ {
static df_unit_physical_description_fn fn = static df_unit_physical_description_fn fn =