Переглянути джерело

Merge pull request #27597 from marxin/fix-Wnon-virtual-dtor-warnings

Fix -Wnon-virtual-dtor warnings.
Rémi Verschelde 6 роки тому
батько
коміт
25c1363a11
3 змінених файлів з 4 додано та 1 видалено
  1. 2 0
      core/script_language.h
  2. 1 1
      drivers/gl_context/context_gl.h
  3. 1 0
      scene/gui/text_edit.h

+ 2 - 0
core/script_language.h

@@ -205,6 +205,8 @@ public:
 	static ScriptCodeCompletionCache *get_singleton() { return singleton; }
 
 	ScriptCodeCompletionCache();
+
+	virtual ~ScriptCodeCompletionCache() {}
 };
 
 class ScriptLanguage {

+ 1 - 1
drivers/gl_context/context_gl.h

@@ -58,7 +58,7 @@ public:
 	virtual bool is_using_vsync() const = 0;
 
 	ContextGL();
-	~ContextGL();
+	virtual ~ContextGL();
 };
 
 #endif

+ 1 - 0
scene/gui/text_edit.h

@@ -683,6 +683,7 @@ protected:
 	TextEdit *text_editor;
 
 public:
+	virtual ~SyntaxHighlighter() {}
 	virtual void _update_cache() = 0;
 	virtual Map<int, TextEdit::HighlighterInfo> _get_line_syntax_highlighting(int p_line) = 0;