diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2019-07-10 15:43:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-10 15:43:15 +0200 |
commit | 34d74840396853f561964c3f4f6e56ac63a57640 (patch) | |
tree | 7a60acf577ea05294f46242f6b934d6661cf75ee /scene/gui | |
parent | 8b778f62347e7aff48122aa3945f1373b3fae5d3 (diff) | |
parent | 01cc7a996babc9173a393bf3dae080dc14a277c9 (diff) |
Merge pull request #30455 from qarmin/const_reference
Pass by reference to const
Diffstat (limited to 'scene/gui')
-rw-r--r-- | scene/gui/spin_box.cpp | 2 | ||||
-rw-r--r-- | scene/gui/spin_box.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/scene/gui/spin_box.cpp b/scene/gui/spin_box.cpp index e778af3ceb..279253889c 100644 --- a/scene/gui/spin_box.cpp +++ b/scene/gui/spin_box.cpp @@ -173,7 +173,7 @@ void SpinBox::_line_edit_focus_exit() { _text_entered(line_edit->get_text()); } -inline void SpinBox::_adjust_width_for_icon(const Ref<Texture> icon) { +inline void SpinBox::_adjust_width_for_icon(const Ref<Texture> &icon) { int w = icon->get_width(); if (w != last_w) { diff --git a/scene/gui/spin_box.h b/scene/gui/spin_box.h index 49dc6d950c..9cf977d2d6 100644 --- a/scene/gui/spin_box.h +++ b/scene/gui/spin_box.h @@ -62,7 +62,7 @@ class SpinBox : public Range { void _line_edit_focus_exit(); - inline void _adjust_width_for_icon(const Ref<Texture> icon); + inline void _adjust_width_for_icon(const Ref<Texture> &icon); protected: void _gui_input(const Ref<InputEvent> &p_event); |