diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-12-11 16:27:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-11 16:27:42 +0100 |
commit | 98c3990f7dc6064123938a9c8fc7ee1bb4a30c2b (patch) | |
tree | 9af47b5fd6b32841f73ba36ee9dc482b8bb621b5 /modules | |
parent | 70a8c379571e0b63a8486f84dde126c5feac55f9 (diff) | |
parent | cbf5641a74f3ca91aecf36bf3dce889e65be03fd (diff) |
Merge pull request #34271 from vnen/gdscript-unused-class-variable-disable
Disable GDScript warning for unused class variable by default
Diffstat (limited to 'modules')
-rw-r--r-- | modules/gdscript/gdscript.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp index 563f7e2471..2f620df8fb 100644 --- a/modules/gdscript/gdscript.cpp +++ b/modules/gdscript/gdscript.cpp @@ -2143,7 +2143,8 @@ 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(); - GLOBAL_DEF("debug/gdscript/warnings/" + warning, !warning.begins_with("unsafe_")); + bool default_enabled = !warning.begins_with("unsafe_") && i != GDScriptWarning::UNUSED_CLASS_VARIABLE; + GLOBAL_DEF("debug/gdscript/warnings/" + warning, default_enabled); } #endif // DEBUG_ENABLED } |