Skip to content

Commit

Permalink
Fix a compilación win32
Browse files Browse the repository at this point in the history
  • Loading branch information
Aulla committed May 27, 2012
1 parent 6516600 commit d2e4bab
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tools/aqods/odf-gen/color.h
Expand Up @@ -99,7 +99,11 @@ class ColorGenerator
ColorGenerator()
: _idx( 0 )
{
#if defined(Q_OS_WIN)
srand( time( NULL ) );
#else
srandom( time( NULL ) );
#endif
}

Color next()
Expand All @@ -109,8 +113,11 @@ class ColorGenerator

if( _idx < sizeof(palette) / sizeof(palette[0]) )
return Color( palette[_idx++] );

#if defined(Q_OS_WIN)
return Color( rand() );
#else
return Color( random() );
#endif
}

private:
Expand Down

0 comments on commit d2e4bab

Please sign in to comment.