diff options
author | Noel Grandin <noel@peralex.com> | 2015-05-27 16:33:44 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-05-28 12:49:54 +0200 |
commit | d5129a9dd68978f9eccdd4597b5b6834557c422a (patch) | |
tree | df43250172f784f3048ce42ce1c3410d1d449c1e /svl/source/notify | |
parent | f3331f7694e74f349375c223ce7ed84838e92d89 (diff) |
new clang plugin: loopvartoosmall
Idea from bubli - look for loops where the index variable is of such
size that it cannot cover the range revealed by examining the length
part of the condition.
So far, I have only run the plugin up till the VCL module.
Also the plugin deliberately excludes anything more complicated than a
straightforward incrementing for loop.
Change-Id: Ifced18b01c03ea537c64168465ce0b8287a42015
Diffstat (limited to 'svl/source/notify')
-rw-r--r-- | svl/source/notify/lstner.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/svl/source/notify/lstner.cxx b/svl/source/notify/lstner.cxx index 4c3dc073f3ab..b7b338767a5e 100644 --- a/svl/source/notify/lstner.cxx +++ b/svl/source/notify/lstner.cxx @@ -45,7 +45,7 @@ SfxListener::SfxListener() : mpImpl(new Impl) SfxListener::SfxListener( const SfxListener &rListener ) : mpImpl(new Impl) { - for ( sal_uInt16 n = 0; n < rListener.mpImpl->maBCs.size(); ++n ) + for ( size_t n = 0; n < rListener.mpImpl->maBCs.size(); ++n ) StartListening( *rListener.mpImpl->maBCs[n] ); } @@ -54,7 +54,7 @@ SfxListener::SfxListener( const SfxListener &rListener ) : mpImpl(new Impl) SfxListener::~SfxListener() { // unregister at all remaining broadcasters - for ( sal_uInt16 nPos = 0; nPos < mpImpl->maBCs.size(); ++nPos ) + for ( size_t nPos = 0; nPos < mpImpl->maBCs.size(); ++nPos ) { SfxBroadcaster *pBC = mpImpl->maBCs[nPos]; pBC->RemoveListener(*this); |