From a45d49e6044d444791d1377cdf0bb3ee8332903f Mon Sep 17 00:00:00 2001 From: houzh <13923402541@gitee.com> Date: Fri, 18 Mar 2022 07:16:40 +0000 Subject: [PATCH] fix some uninit variables --- src/gui/widget/abslistview.cc | 5 +++-- src/gui/widget/fastscroller.cc | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gui/widget/abslistview.cc b/src/gui/widget/abslistview.cc index 2d7dbace..fa4e0864 100644 --- a/src/gui/widget/abslistview.cc +++ b/src/gui/widget/abslistview.cc @@ -271,9 +271,10 @@ void AbsListView::initAbsListView(const AttributeSet&atts) { mFlingRunnable = std::bind(&AbsListView::FLY_Proc,this); mCheckFlywheel = std::bind(&AbsListView::FLY_CheckFlyWheelProc,this); - mWidthMeasureSpec=0; - mSelector = nullptr; + mSelector = nullptr; + mDirection = 0; mCacheColorHint = 0; + mWidthMeasureSpec = 0; mResurrectToPosition = INVALID_POSITION; mLayoutMode = LAYOUT_FORCE_TOP; mTouchMode = TOUCH_MODE_REST ; diff --git a/src/gui/widget/fastscroller.cc b/src/gui/widget/fastscroller.cc index 10880d72..d15e52a6 100644 --- a/src/gui/widget/fastscroller.cc +++ b/src/gui/widget/fastscroller.cc @@ -11,6 +11,7 @@ FastScroller::FastScroller(AbsListView*listView,const std::string& styleResId){ mOldItemCount = listView->getCount(); mOldChildCount = listView->getChildCount(); mHeaderCount = 0; + mFirstVisibleItem = 0; Context* context = listView->getContext(); mScaledTouchSlop = ViewConfiguration::get(context).getScaledTouchSlop();