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>
(cherry picked from commit 0747f550f7)
r14.0.x r14.0.5
Slávek Banko 8 years ago
parent bf6ab2d7b3
commit c01e03c55d

@ -2737,6 +2737,9 @@ static int generateEnumMemberTable(sipSpec *pt, moduleDef *mod, classDef *cd,
prcode(fp, prcode(fp,
" {%N, ", emd->pyname); " {%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 (cd != NULL)
{ {
if (isProtectedEnum(emd->ed)) if (isProtectedEnum(emd->ed))

Loading…
Cancel
Save