diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2015-08-02 11:30:14 +0200 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2015-08-16 09:10:14 +0200 |
commit | f455a60824c9af4ec9e7e6b8692677a83392a02c (patch) | |
tree | 79e7d2f382cbfa474baf247664f01c6d3d9368c2 /vcl | |
parent | aa1918efe9afac79b5a715a7a31239d320a75edc (diff) |
Throbber: remove redundant field and fix conversion warnings
Change-Id: I1e4712c4c6eae890b93936f25632aa8a7422e1db
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/control/throbber.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/vcl/source/control/throbber.cxx b/vcl/source/control/throbber.cxx index f71aee55361f..c38690f01389 100644 --- a/vcl/source/control/throbber.cxx +++ b/vcl/source/control/throbber.cxx @@ -47,7 +47,6 @@ Throbber::Throbber( vcl::Window* i_parentWindow, WinBits i_style, const ImageSet ,mbRepeat( true ) ,mnStepTime( 100 ) ,mnCurStep( 0 ) - ,mnStepCount( 0 ) ,meImageSet( i_imageSet ) { maWaitTimer.SetTimeout( mnStepTime ); @@ -185,10 +184,11 @@ bool Throbber::isRunning() const void Throbber::setImageList( ::std::vector< Image > const& i_images ) { + SAL_WARN_IF( i_images.size()>=SAL_MAX_INT32, "vcl.control", "Throbber::setImageList: too many images!" ); + maImageList = i_images; - mnStepCount = maImageList.size(); - const Image aInitialImage( mnStepCount ? maImageList[ 0 ] : Image() ); + const Image aInitialImage( maImageList.size() ? maImageList[ 0 ] : Image() ); SetImage( aInitialImage ); } @@ -245,8 +245,8 @@ IMPL_LINK_NOARG_TYPED(Throbber, TimeOutHdl, Timer *, void) if ( maImageList.empty() ) return; - if ( mnCurStep < mnStepCount - 1 ) - mnCurStep += 1; + if ( mnCurStep < static_cast<sal_Int32>(maImageList.size()-1) ) + ++mnCurStep; else { if ( mbRepeat ) |