Skip to content

Commit

Permalink
Disabled the unused argument warning by default.
Browse files Browse the repository at this point in the history
  • Loading branch information
Relintai committed Jul 18, 2024
1 parent 5025e3f commit f93f0e1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/cscript/cscript.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion modules/gdscript/gdscript.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f93f0e1

Please sign in to comment.