diff options
author | 3deathtoll <electriccobweb@gmail.com> | 2023-04-07 23:46:50 +0530 |
---|---|---|
committer | 3deathtoll <electriccobweb@gmail.com> | 2023-04-07 23:46:50 +0530 |
commit | 3841c4a4b4a9232c64af1bf931e921ff78e55eb0 (patch) | |
tree | 68ea3b1ce1cc2f9d1f46281ce59121140c846b7e | |
parent | 132000f58d545cbf537cb751cb787d48c0b2085b (diff) | |
download | redot-engine-3841c4a4b4a9232c64af1bf931e921ff78e55eb0.tar.gz |
Make SyntaxHighlighter::get_text_edit a const function
-rw-r--r-- | doc/classes/SyntaxHighlighter.xml | 2 | ||||
-rw-r--r-- | scene/resources/syntax_highlighter.cpp | 2 | ||||
-rw-r--r-- | 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 76f98f9edb..79f4944bae 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. </description> </method> - <method name="get_text_edit"> + <method name="get_text_edit" qualifiers="const"> <return type="TextEdit" /> <description> Returns the associated [TextEdit] node. diff --git a/scene/resources/syntax_highlighter.cpp b/scene/resources/syntax_highlighter.cpp index 05a8cf2dc7..903be41c26 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 7cc58cbbda..bf263f9490 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() {} |