Add const lvalue ref to container parameters
This commit is contained in:
parent
89cc635c05
commit
96a95cb974
68 changed files with 185 additions and 185 deletions
|
|
@ -540,7 +540,7 @@ public:
|
|||
virtual void get_string_delimiters(List<String> *p_delimiters) const override;
|
||||
virtual bool is_using_templates() override;
|
||||
virtual Ref<Script> make_template(const String &p_template, const String &p_class_name, const String &p_base_class_name) const override;
|
||||
virtual Vector<ScriptTemplate> get_built_in_templates(StringName p_object) override;
|
||||
virtual Vector<ScriptTemplate> get_built_in_templates(const StringName &p_object) override;
|
||||
virtual bool validate(const String &p_script, const String &p_path = "", List<String> *r_functions = nullptr, List<ScriptLanguage::ScriptError> *r_errors = nullptr, List<ScriptLanguage::Warning> *r_warnings = nullptr, HashSet<int> *r_safe_lines = nullptr) const override;
|
||||
virtual Script *create_script() const override;
|
||||
#ifndef DISABLE_DEPRECATED
|
||||
|
|
|
|||
|
|
@ -845,7 +845,7 @@ GDScriptParser::DataType GDScriptAnalyzer::resolve_datatype(GDScriptParser::Type
|
|||
return result;
|
||||
}
|
||||
|
||||
void GDScriptAnalyzer::resolve_class_member(GDScriptParser::ClassNode *p_class, StringName p_name, const GDScriptParser::Node *p_source) {
|
||||
void GDScriptAnalyzer::resolve_class_member(GDScriptParser::ClassNode *p_class, const StringName &p_name, const GDScriptParser::Node *p_source) {
|
||||
ERR_FAIL_COND(!p_class->has_member(p_name));
|
||||
resolve_class_member(p_class, p_class->members_indices[p_name], p_source);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ class GDScriptAnalyzer {
|
|||
void decide_suite_type(GDScriptParser::Node *p_suite, GDScriptParser::Node *p_statement);
|
||||
|
||||
void resolve_annotation(GDScriptParser::AnnotationNode *p_annotation);
|
||||
void resolve_class_member(GDScriptParser::ClassNode *p_class, StringName p_name, const GDScriptParser::Node *p_source = nullptr);
|
||||
void resolve_class_member(GDScriptParser::ClassNode *p_class, const StringName &p_name, const GDScriptParser::Node *p_source = nullptr);
|
||||
void resolve_class_member(GDScriptParser::ClassNode *p_class, int p_index, const GDScriptParser::Node *p_source = nullptr);
|
||||
void resolve_class_interface(GDScriptParser::ClassNode *p_class, const GDScriptParser::Node *p_source = nullptr);
|
||||
void resolve_class_interface(GDScriptParser::ClassNode *p_class, bool p_recursive);
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ Ref<Script> GDScriptLanguage::make_template(const String &p_template, const Stri
|
|||
return scr;
|
||||
}
|
||||
|
||||
Vector<ScriptLanguage::ScriptTemplate> GDScriptLanguage::get_built_in_templates(StringName p_object) {
|
||||
Vector<ScriptLanguage::ScriptTemplate> GDScriptLanguage::get_built_in_templates(const StringName &p_object) {
|
||||
Vector<ScriptLanguage::ScriptTemplate> templates;
|
||||
#ifdef TOOLS_ENABLED
|
||||
for (int i = 0; i < TEMPLATES_ARRAY_SIZE; i++) {
|
||||
|
|
@ -537,7 +537,7 @@ struct GDScriptCompletionIdentifier {
|
|||
// appears. For example, if you are completing code in a class that inherits Node2D, a property found on Node2D
|
||||
// will have a "better" (lower) location "score" than a property that is found on CanvasItem.
|
||||
|
||||
static int _get_property_location(StringName p_class, StringName p_property) {
|
||||
static int _get_property_location(const StringName &p_class, const StringName &p_property) {
|
||||
if (!ClassDB::has_property(p_class, p_property)) {
|
||||
return ScriptLanguage::LOCATION_OTHER;
|
||||
}
|
||||
|
|
@ -552,7 +552,7 @@ static int _get_property_location(StringName p_class, StringName p_property) {
|
|||
return depth | ScriptLanguage::LOCATION_PARENT_MASK;
|
||||
}
|
||||
|
||||
static int _get_constant_location(StringName p_class, StringName p_constant) {
|
||||
static int _get_constant_location(const StringName &p_class, const StringName &p_constant) {
|
||||
if (!ClassDB::has_integer_constant(p_class, p_constant)) {
|
||||
return ScriptLanguage::LOCATION_OTHER;
|
||||
}
|
||||
|
|
@ -567,7 +567,7 @@ static int _get_constant_location(StringName p_class, StringName p_constant) {
|
|||
return depth | ScriptLanguage::LOCATION_PARENT_MASK;
|
||||
}
|
||||
|
||||
static int _get_signal_location(StringName p_class, StringName p_signal) {
|
||||
static int _get_signal_location(const StringName &p_class, const StringName &p_signal) {
|
||||
if (!ClassDB::has_signal(p_class, p_signal)) {
|
||||
return ScriptLanguage::LOCATION_OTHER;
|
||||
}
|
||||
|
|
@ -582,7 +582,7 @@ static int _get_signal_location(StringName p_class, StringName p_signal) {
|
|||
return depth | ScriptLanguage::LOCATION_PARENT_MASK;
|
||||
}
|
||||
|
||||
static int _get_method_location(StringName p_class, StringName p_method) {
|
||||
static int _get_method_location(const StringName &p_class, const StringName &p_method) {
|
||||
if (!ClassDB::has_method(p_class, p_method)) {
|
||||
return ScriptLanguage::LOCATION_OTHER;
|
||||
}
|
||||
|
|
@ -597,7 +597,7 @@ static int _get_method_location(StringName p_class, StringName p_method) {
|
|||
return depth | ScriptLanguage::LOCATION_PARENT_MASK;
|
||||
}
|
||||
|
||||
static int _get_enum_constant_location(StringName p_class, StringName p_enum_constant) {
|
||||
static int _get_enum_constant_location(const StringName &p_class, const StringName &p_enum_constant) {
|
||||
if (!ClassDB::get_integer_constant_enum(p_class, p_enum_constant)) {
|
||||
return ScriptLanguage::LOCATION_OTHER;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue