From 3841c4a4b4a9232c64af1bf931e921ff78e55eb0 Mon Sep 17 00:00:00 2001 From: 3deathtoll Date: Fri, 7 Apr 2023 23:46:50 +0530 Subject: [PATCH] Make SyntaxHighlighter::get_text_edit a const function --- doc/classes/SyntaxHighlighter.xml | 2 +- scene/resources/syntax_highlighter.cpp | 2 +- scene/resources/syntax_highlighter.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/classes/SyntaxHighlighter.xml b/doc/classes/SyntaxHighlighter.xml index 76f98f9edb4..79f4944bae0 100644 --- a/doc/classes/SyntaxHighlighter.xml +++ b/doc/classes/SyntaxHighlighter.xml @@ -58,7 +58,7 @@ This will color columns 0-4 red, and columns 5-eol in green. - + Returns the associated [TextEdit] node. diff --git a/scene/resources/syntax_highlighter.cpp b/scene/resources/syntax_highlighter.cpp index 05a8cf2dc78..903be41c26c 100644 --- a/scene/resources/syntax_highlighter.cpp +++ b/scene/resources/syntax_highlighter.cpp @@ -99,7 +99,7 @@ void SyntaxHighlighter::set_text_edit(TextEdit *p_text_edit) { update_cache(); } -TextEdit *SyntaxHighlighter::get_text_edit() { +TextEdit *SyntaxHighlighter::get_text_edit() const { return text_edit; } diff --git a/scene/resources/syntax_highlighter.h b/scene/resources/syntax_highlighter.h index 7cc58cbbda5..bf263f9490d 100644 --- a/scene/resources/syntax_highlighter.h +++ b/scene/resources/syntax_highlighter.h @@ -64,7 +64,7 @@ public: virtual void _update_cache() {} void set_text_edit(TextEdit *p_text_edit); - TextEdit *get_text_edit(); + TextEdit *get_text_edit() const; SyntaxHighlighter() {} virtual ~SyntaxHighlighter() {}