diff options
author | George Marques <george@gmarqu.es> | 2019-12-11 11:02:07 -0300 |
---|---|---|
committer | George Marques <george@gmarqu.es> | 2019-12-11 11:02:07 -0300 |
commit | cbf5641a74f3ca91aecf36bf3dce889e65be03fd (patch) | |
tree | f587feeb64d3c659024165c0c536dbbe132737cb | |
parent | cd9d5132854e239726a08098d9029bdd00eee752 (diff) |
Disable GDScript warning for unused class variable by default
-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 } |