Force cast in sipEnumMemberDef

This resolves FTBFS due to a narrowing conversions using
C++11 dialect (GCC6) in python-tqt and python-trinity

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/1/head
Slávek Banko 8 years ago
parent 916b7d8e62
commit 0747f550f7

@ -2737,6 +2737,9 @@ static int generateEnumMemberTable(sipSpec *pt, moduleDef *mod, classDef *cd,
prcode(fp,
" {%N, ", emd->pyname);
// enums in sip are always int, but can be an unsigned in C++ code
// therefore it is necessary to force the cast in the generated files
prcode(fp, "(int)");
if (cd != NULL)
{
if (isProtectedEnum(emd->ed))

Loading…
Cancel
Save