diff options
| author | Rémi Verschelde <rverschelde@gmail.com> | 2020-05-14 16:41:43 +0200 |
|---|---|---|
| committer | Rémi Verschelde <rverschelde@gmail.com> | 2020-05-14 21:57:34 +0200 |
| commit | 0ee0fa42e6639b6fa474b7cf6afc6b1a78142185 (patch) | |
| tree | 198d4ff7665d89307f6ca2469fa38620a9eb1672 /scene/gui/spin_box.cpp | |
| parent | 07bc4e2f96f8f47991339654ff4ab16acc19d44f (diff) | |
| download | redot-engine-0ee0fa42e6639b6fa474b7cf6afc6b1a78142185.tar.gz | |
Style: Enforce braces around if blocks and loops
Using clang-tidy's `readability-braces-around-statements`.
https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
Diffstat (limited to 'scene/gui/spin_box.cpp')
| -rw-r--r-- | scene/gui/spin_box.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/scene/gui/spin_box.cpp b/scene/gui/spin_box.cpp index a82e9f7009..3670f13705 100644 --- a/scene/gui/spin_box.cpp +++ b/scene/gui/spin_box.cpp @@ -41,10 +41,12 @@ Size2 SpinBox::get_minimum_size() const { void SpinBox::_value_changed(double) { String value = String::num(get_value(), Math::range_step_decimals(get_step())); - if (prefix != "") + if (prefix != "") { value = prefix + " " + value; - if (suffix != "") + } + if (suffix != "") { value += " " + suffix; + } line_edit->set_text(value); } @@ -159,8 +161,9 @@ void SpinBox::_gui_input(const Ref<InputEvent> &p_event) { void SpinBox::_line_edit_focus_exit() { // discontinue because the focus_exit was caused by right-click context menu - if (line_edit->get_menu()->is_visible()) + if (line_edit->get_menu()->is_visible()) { return; + } _text_entered(line_edit->get_text()); } |
