mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 01:07:51 -04:00
cppparser: fix scope bug in constructor inits
This also fixes the Android build.
This commit is contained in:
parent
828f1c10ca
commit
d6657baf29
File diff suppressed because it is too large
Load Diff
@ -928,12 +928,21 @@ type_like_declaration:
|
||||
|
||||
current_scope->add_declaration($2, global_scope, current_lexer, @2);
|
||||
}
|
||||
| storage_class constructor_prototype maybe_initialize_or_constructor_body
|
||||
| storage_class constructor_prototype
|
||||
{
|
||||
if ($2 != (CPPInstance *)NULL) {
|
||||
// Push the scope so that the initializers can make use of things defined
|
||||
// in the class body.
|
||||
push_scope($2->get_scope(current_scope, global_scope));
|
||||
$2->_storage_class |= (current_storage_class | $1);
|
||||
}
|
||||
}
|
||||
maybe_initialize_or_constructor_body
|
||||
{
|
||||
if ($2 != (CPPInstance *)NULL) {
|
||||
pop_scope();
|
||||
current_scope->add_declaration($2, global_scope, current_lexer, @2);
|
||||
$2->set_initializer($3);
|
||||
$2->set_initializer($4);
|
||||
}
|
||||
}
|
||||
| storage_class function_prototype maybe_initialize_or_function_body
|
||||
|
Loading…
x
Reference in New Issue
Block a user