fixed c++ loop index scope problem

This commit is contained in:
Jeff Hill
2001-05-22 02:21:57 +00:00
parent 7f88505a9a
commit f78c134d31
2 changed files with 4 additions and 2 deletions

View File

@@ -70,7 +70,8 @@ static double threadSleepMeasureDelayError( const double & delay )
static void threadSleepTest()
{
double errorSum = 0.0;
for ( int i = 0u; i < 20; i++ ) {
int i;
for ( i = 0u; i < 20; i++ ) {
double delay = ldexp ( 1.0 , -i );
errorSum += threadSleepMeasureDelayError ( delay );
}