Core: Add dedicated BitField template

This commit is contained in:
Thaddeus Crews 2024-08-20 09:50:44 -05:00
parent 7b9c5122fa
commit 0d267e7b1e
No known key found for this signature in database
GPG key ID: 8C6E5FEB5FC03CCC
46 changed files with 188 additions and 155 deletions

View file

@ -1803,7 +1803,7 @@ void GDScriptAnalyzer::resolve_function_signature(GDScriptParser::FunctionNode *
GDScriptParser::DataType parent_return_type;
List<GDScriptParser::DataType> parameters_types;
int default_par_count = 0;
BitField<MethodFlags> method_flags;
BitField<MethodFlags> method_flags = {};
StringName native_base;
if (!p_is_lambda && get_function_signature(p_function, false, base_type, function_name, parent_return_type, parameters_types, default_par_count, method_flags, &native_base)) {
bool valid = p_function->is_static == method_flags.has_flag(METHOD_FLAG_STATIC);
@ -2276,7 +2276,7 @@ void GDScriptAnalyzer::resolve_for(GDScriptParser::ForNode *p_for) {
GDScriptParser::DataType return_type;
List<GDScriptParser::DataType> par_types;
int default_arg_count = 0;
BitField<MethodFlags> method_flags;
BitField<MethodFlags> method_flags = {};
if (get_function_signature(p_for->list, false, list_type, CoreStringName(_iter_get), return_type, par_types, default_arg_count, method_flags)) {
variable_type = return_type;
variable_type.type_source = list_type.type_source;
@ -3567,7 +3567,7 @@ void GDScriptAnalyzer::reduce_call(GDScriptParser::CallNode *p_call, bool p_is_a
}
int default_arg_count = 0;
BitField<MethodFlags> method_flags;
BitField<MethodFlags> method_flags = {};
GDScriptParser::DataType return_type;
List<GDScriptParser::DataType> par_types;