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:
parent
3cbbe7be2c
commit
880fc26857
@ -59,7 +59,7 @@ int main(int argc, char *argv[]) {
|
|||||||
// Add 200 random numbers to the tree
|
// Add 200 random numbers to the tree
|
||||||
char word[50];
|
char word[50];
|
||||||
for ( int t=0; t<200; t++ ) {
|
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);
|
G_tree->add(word);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user