diff options
| author | Thaer Razeq | 2017-02-23 02:28:09 -0600 |
|---|---|---|
| committer | REBELLIOUSX\Rebel_X | 2017-02-28 07:52:02 -0600 |
| commit | f50488a36188d5975bfa8554687a1acdd394d6a9 (patch) | |
| tree | 3b8712b9162aeb30e8eaaeeca63e6d04c7b9e3b5 /scene/gui/item_list.cpp | |
| parent | 0f8c6dd3822c38b8145f08265abb9eba479f4d15 (diff) | |
| download | godot-f50488a36188d5975bfa8554687a1acdd394d6a9.tar.gz godot-f50488a36188d5975bfa8554687a1acdd394d6a9.tar.zst godot-f50488a36188d5975bfa8554687a1acdd394d6a9.zip | |
Various fixes detected using PVS-Studio static analyzer.
- Add FIXME tags comments to some unfixed potential bugs
- Remove some checks (always false: unsigned never < 0)
- Fix some if statements based on reviews.
- Bunch of missing `else` statements
Diffstat (limited to 'scene/gui/item_list.cpp')
| -rw-r--r-- | scene/gui/item_list.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp index a35df53e5..91bd16ee0 100644 --- a/scene/gui/item_list.cpp +++ b/scene/gui/item_list.cpp @@ -314,7 +314,7 @@ void ItemList::move_item(int p_item,int p_to_pos) { if (current<0) { //do none - } if (p_item==current) { + } else if (p_item==current) { current=p_to_pos; } else if (p_to_pos>p_item && current>p_item && current<p_to_pos) { current--; |
