summaryrefslogtreecommitdiff
path: root/vcl/source/window/debugevent.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/window/debugevent.cxx')
-rw-r--r--vcl/source/window/debugevent.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/vcl/source/window/debugevent.cxx b/vcl/source/window/debugevent.cxx
index 3acf9d6e7daf..cff4d023dfdd 100644
--- a/vcl/source/window/debugevent.cxx
+++ b/vcl/source/window/debugevent.cxx
@@ -222,13 +222,13 @@ void DebugEventInjector::InjectKeyNavEdit()
double d = 0.0, nRand = getRandom();
sal_uInt16 nKey = KEY_SPACE;
- for ( size_t i = 0; i < SAL_N_ELEMENTS( nWeights ); ++i )
+ for (auto & rWeight : nWeights)
{
- d += nWeights[i].mnProb;
+ d += rWeight.mnProb;
assert (d < 1.01);
if ( nRand < d )
{
- nKey = nWeights[i].mnKey;
+ nKey = rWeight.mnKey;
break;
}
}