Fix clang compiler warning

Warning was: "implicit conversion from 'int' to 'float' changes value
  from 2147483647 to 2147483648"

Not a big deal in this context, but anyway.
This commit is contained in:
Albrecht Schlosser 2023-02-07 16:17:54 +01:00
parent 3cbbe7be2c
commit 880fc26857
1 changed files with 1 additions and 1 deletions

View File

@ -59,7 +59,7 @@ int main(int argc, char *argv[]) {
// Add 200 random numbers to the tree
char word[50];
for ( int t=0; t<200; t++ ) {
sprintf(word, "%ld", long((float(rand()) / RAND_MAX) * 1000000));
sprintf(word, "%ld", long((double(rand()) / double(RAND_MAX)) * 1000000));
G_tree->add(word);
}