diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2015-01-10 15:52:17 +0100 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-01-12 06:45:19 +0000 |
commit | d5f48d742ac1fea9fd341244bbcea09bcd78b476 (patch) | |
tree | e68143fca184da493e368081981d666bad8bd906 /svl/source/svdde | |
parent | babe4ab629d476bbddbacb85c33436ba09655aea (diff) |
fdo#39440 reduce scope of local variables
This addresses some cppcheck warnings.
Change-Id: I46b9293eed0cba2ebca119cc1fb0a6334ea66308
Reviewed-on: https://gerrit.libreoffice.org/13844
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'svl/source/svdde')
-rw-r--r-- | svl/source/svdde/ddesvr.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/svl/source/svdde/ddesvr.cxx b/svl/source/svdde/ddesvr.cxx index 24492be85a3a..1dd711083377 100644 --- a/svl/source/svdde/ddesvr.cxx +++ b/svl/source/svdde/ddesvr.cxx @@ -372,11 +372,10 @@ found: DdeService* DdeInternal::FindService( HSZ hService ) { - DdeService* s; DdeServices& rSvc = DdeService::GetServices(); for (DdeServices::iterator aI = rSvc.begin(); aI != rSvc.end(); ++aI) { - s = *aI; + DdeService* s = *aI; if ( *s->pName == hService ) return s; } @@ -932,12 +931,11 @@ OUString DdeService::Topics() OUString DdeService::Formats() { OUString s; - long f; short n = 0; for (size_t i = 0; i < aFormats.size(); ++i, ++n) { - f = aFormats[ i ]; + long f = aFormats[ i ]; if ( n ) s += "\t"; |