diff --git a/modules/gdscript/gdscript_tokenizer.h b/modules/gdscript/gdscript_tokenizer.h index 28a08bfaf8d..11a291cb2e2 100644 --- a/modules/gdscript/gdscript_tokenizer.h +++ b/modules/gdscript/gdscript_tokenizer.h @@ -283,8 +283,14 @@ public: virtual String get_token_error(int p_offset = 0) const; virtual void advance(int p_amount = 1); #ifdef DEBUG_ENABLED - virtual const Vector > &get_warning_skips() const { return Vector >(); } - virtual const Set &get_warning_global_skips() const { return Set(); } + virtual const Vector > &get_warning_skips() const { + static Vector > v; + return v; + } + virtual const Set &get_warning_global_skips() const { + static Set s; + return s; + } virtual const bool is_ignoring_warnings() const { return true; } #endif // DEBUG_ENABLED GDScriptTokenizerBuffer();