diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-05-01 08:19:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-01 08:19:04 +0200 |
commit | ae41e35191cc64471f918318dc32428728c9c4bb (patch) | |
tree | 904f7611e51a9a0fa8f3e75f5556c89aa66396b5 /core | |
parent | 8afc9c3938af385be17aab92ec5c4adcbfb0781a (diff) | |
parent | 8460d0678c28816f6f206f40b71de2510fab1ffc (diff) |
Merge pull request #27676 from qarmin/small_fixes_2
Small fixes to static analyzer bugs
Diffstat (limited to 'core')
-rw-r--r-- | core/list.h | 6 | ||||
-rw-r--r-- | core/math/rect2.h | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/core/list.h b/core/list.h index c21c20ba34..103a82a31d 100644 --- a/core/list.h +++ b/core/list.h @@ -503,8 +503,7 @@ public: if (p_I->prev_ptr) p_I->prev_ptr->next_ptr = p_I->next_ptr; - if (p_I->next_ptr) - p_I->next_ptr->prev_ptr = p_I->prev_ptr; + p_I->next_ptr->prev_ptr = p_I->prev_ptr; _data->last->next_ptr = p_I; p_I->prev_ptr = _data->last; @@ -538,8 +537,7 @@ public: if (_data->last == p_I) _data->last = p_I->prev_ptr; - if (p_I->prev_ptr) - p_I->prev_ptr->next_ptr = p_I->next_ptr; + p_I->prev_ptr->next_ptr = p_I->next_ptr; if (p_I->next_ptr) p_I->next_ptr->prev_ptr = p_I->prev_ptr; diff --git a/core/math/rect2.h b/core/math/rect2.h index 3b66617c83..d636aa223f 100644 --- a/core/math/rect2.h +++ b/core/math/rect2.h @@ -67,7 +67,7 @@ struct Rect2 { if (p_point.x < position.x) { real_t d = position.x - p_point.x; - dist = inside ? d : MIN(dist, d); + dist = d; inside = false; } if (p_point.y < position.y) { |