diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2015-12-03 13:06:12 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@theqtcompany.com> | 2015-12-19 07:41:50 +0000 |
commit | 66441d7a828ddcdae709cf4699420147f376bdcd (patch) | |
tree | fc16433f11c0eb8dd05971566528c70686a72dcc /src/widgets/widgets/qwidgetanimator.cpp | |
parent | 0f923a8ce45a0b9379bf0a43e68897a3a8333fda (diff) |
Make use of new QHash::erase(const_iterator) overload
Drive-by changes:
- use auto for iterators
- add Q_UNLIKELY for conditions leading to a qWarning etc
Change-Id: Iff8f36d67c96674d354a501b26640f73c15ce58d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Sérgio Martins <iamsergio@gmail.com>
Diffstat (limited to 'src/widgets/widgets/qwidgetanimator.cpp')
-rw-r--r-- | src/widgets/widgets/qwidgetanimator.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/widgets/widgets/qwidgetanimator.cpp b/src/widgets/widgets/qwidgetanimator.cpp index 2bed11289f..3dc0e9a673 100644 --- a/src/widgets/widgets/qwidgetanimator.cpp +++ b/src/widgets/widgets/qwidgetanimator.cpp @@ -47,8 +47,8 @@ QWidgetAnimator::QWidgetAnimator(QMainWindowLayout *layout) : m_mainWindowLayout void QWidgetAnimator::abort(QWidget *w) { #ifndef QT_NO_ANIMATION - AnimationMap::iterator it = m_animation_map.find(w); - if (it == m_animation_map.end()) + const auto it = m_animation_map.constFind(w); + if (it == m_animation_map.cend()) return; QPropertyAnimation *anim = *it; m_animation_map.erase(it); |