diff options
author | Anilforextra <anilforextra@gmail.com> | 2021-09-23 20:43:43 +0545 |
---|---|---|
committer | Anilforextra <anilforextra@gmail.com> | 2021-09-23 22:26:07 +0545 |
commit | cc51b045da4bf40722d347c6306b2764a1c9d813 (patch) | |
tree | 96323b3b6cd43dbbec3a74a9c09762c911e9dc32 /scene/gui/code_edit.cpp | |
parent | 2ec1152b0fda21f2050b30e49630659697a5e68b (diff) | |
download | redot-engine-cc51b045da4bf40722d347c6306b2764a1c9d813.tar.gz |
Construct values only when necessary.
Diffstat (limited to 'scene/gui/code_edit.cpp')
-rw-r--r-- | scene/gui/code_edit.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/gui/code_edit.cpp b/scene/gui/code_edit.cpp index 4dfd6902e6..5d1106bb41 100644 --- a/scene/gui/code_edit.cpp +++ b/scene/gui/code_edit.cpp @@ -296,7 +296,7 @@ void CodeEdit::gui_input(const Ref<InputEvent> &p_gui_input) { mpos.x = get_size().x - mpos.x; } - Point2i pos = get_line_column_at_pos(Point2i(mpos.x, mpos.y)); + Point2i pos = get_line_column_at_pos(mpos); int line = pos.y; int col = pos.x; @@ -321,7 +321,7 @@ void CodeEdit::gui_input(const Ref<InputEvent> &p_gui_input) { mpos.x = get_size().x - mpos.x; } - Point2i pos = get_line_column_at_pos(Point2i(mpos.x, mpos.y)); + Point2i pos = get_line_column_at_pos(mpos); int line = pos.y; int col = pos.x; |