summaryrefslogtreecommitdiff
path: root/scene/resources/text_paragraph.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-04-05 14:34:31 +0200
committerGitHub <noreply@github.com>2021-04-05 14:34:31 +0200
commitb80b072c44cfc4f6ec1bfecc045374597eb296e0 (patch)
tree39544b604c8be6cf6daa56a2a7774426d394c2a3 /scene/resources/text_paragraph.cpp
parent33b8f1448e3efd8ad71c65c3d42581fae82905a3 (diff)
parentd83761ba80b90e17aaefaa83c7ece0fa89511266 (diff)
Merge pull request #47642 from akien-mga/clang-tidy-fixes
Diffstat (limited to 'scene/resources/text_paragraph.cpp')
-rw-r--r--scene/resources/text_paragraph.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/scene/resources/text_paragraph.cpp b/scene/resources/text_paragraph.cpp
index 012d36cc35..341f5abd80 100644
--- a/scene/resources/text_paragraph.cpp
+++ b/scene/resources/text_paragraph.cpp
@@ -620,11 +620,13 @@ int TextParagraph::hit_test(const Point2 &p_coords) const {
const_cast<TextParagraph *>(this)->_shape_lines();
Vector2 ofs;
if (TS->shaped_text_get_orientation(rid) == TextServer::ORIENTATION_HORIZONTAL) {
- if (ofs.y < 0)
+ if (ofs.y < 0) {
return 0;
+ }
} else {
- if (ofs.x < 0)
+ if (ofs.x < 0) {
return 0;
+ }
}
for (int i = 0; i < lines.size(); i++) {
if (TS->shaped_text_get_orientation(lines[i]) == TextServer::ORIENTATION_HORIZONTAL) {