ruby: fix warning in codegen with initvalue

develop
jj 2012-04-26 15:37:10 +02:00
parent 03925c923a
commit 9b7fbcc477
1 changed files with 1 additions and 1 deletions

@ -262,7 +262,7 @@ sub render_item_number {
$initvalue = 1 if ($initvalue and $initvalue eq 'true');
# XXX needs pre-declaration of the enum...
$initvalue = rb_ucase($item->getAttribute('type-name')) . '::' . $initvalue if ($subtype and $subtype eq 'enum' and $initvalue =~ /[a-zA-Z]/);
$initvalue = rb_ucase($item->getAttribute('type-name')) . '::' . $initvalue if ($initvalue and $subtype and $subtype eq 'enum' and $initvalue =~ /[a-zA-Z]/);
$subtype = $item->getAttribute('base-type') if (!$subtype or $subtype eq 'enum' or $subtype eq 'bitfield');
$subtype = 'int32_t' if (!$subtype);