mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 01:44:06 -04:00
Fix wrapper for operator bool of TypeHandle
This commit is contained in:
parent
445c3461d6
commit
1d9aff0c48
@ -146,20 +146,17 @@ call_function(ostream &out, int indent_level, bool convert_result,
|
||||
|
||||
} else if (_type == T_typecast_method) {
|
||||
// A typecast method can be invoked implicitly.
|
||||
string cast_expr =
|
||||
"(" + _return_type->get_orig_type()->get_local_name(&parser) + ")";
|
||||
ostringstream cast_expr;
|
||||
cast_expr << "("
|
||||
<< _return_type->get_orig_type()->get_local_name(&parser) << ")";
|
||||
|
||||
if (TypeManager::is_handle(_cpptype)) {
|
||||
cast_expr += "(" + container + ")";
|
||||
} else {
|
||||
cast_expr += "(*" + container + ")";
|
||||
}
|
||||
_parameters[0]._remap->pass_parameter(cast_expr, container);
|
||||
|
||||
if (!convert_result) {
|
||||
return_expr = cast_expr;
|
||||
return_expr = cast_expr.str();
|
||||
} else {
|
||||
string new_str =
|
||||
_return_type->prepare_return_expr(out, indent_level, cast_expr);
|
||||
_return_type->prepare_return_expr(out, indent_level, cast_expr.str());
|
||||
return_expr = _return_type->get_return_expr(new_str);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user