Disabled the unused argument warning by default.

This commit is contained in:
Relintai 2024-07-18 11:13:26 +02:00
parent 5025e3f4b6
commit f93f0e1984
2 changed files with 2 additions and 2 deletions

View File

@ -2066,7 +2066,7 @@ CScriptLanguage::CScriptLanguage() {
GLOBAL_DEF("debug/cscript/completion/autocomplete_setters_and_getters", false);
for (int i = 0; i < (int)CScriptWarning::WARNING_MAX; i++) {
String warning = CScriptWarning::get_name_from_code((CScriptWarning::Code)i).to_lower();
bool default_enabled = !warning.begins_with("unsafe_") && i != CScriptWarning::UNUSED_CLASS_VARIABLE && i != CScriptWarning::RETURN_VALUE_DISCARDED;
bool default_enabled = !warning.begins_with("unsafe_") && i != CScriptWarning::UNUSED_CLASS_VARIABLE && i != GDScriptWarning::UNUSED_ARGUMENT && i != CScriptWarning::RETURN_VALUE_DISCARDED;
GLOBAL_DEF("debug/cscript/warnings/" + warning, default_enabled);
}
#endif // DEBUG_ENABLED

View File

@ -2111,7 +2111,7 @@ GDScriptLanguage::GDScriptLanguage() {
GLOBAL_DEF("debug/gdscript/completion/autocomplete_setters_and_getters", false);
for (int i = 0; i < (int)GDScriptWarning::WARNING_MAX; i++) {
String warning = GDScriptWarning::get_name_from_code((GDScriptWarning::Code)i).to_lower();
bool default_enabled = !warning.begins_with("unsafe_") && i != GDScriptWarning::UNUSED_CLASS_VARIABLE && i != GDScriptWarning::RETURN_VALUE_DISCARDED;
bool default_enabled = !warning.begins_with("unsafe_") && i != GDScriptWarning::UNUSED_CLASS_VARIABLE && i != GDScriptWarning::UNUSED_ARGUMENT && i != GDScriptWarning::RETURN_VALUE_DISCARDED;
GLOBAL_DEF("debug/gdscript/warnings/" + warning, default_enabled);
}
#endif // DEBUG_ENABLED