From 880fc26857d068789119ac79acf58b57c7d94b9e Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Tue, 7 Feb 2023 16:17:54 +0100 Subject: 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. --- examples/tree-custom-sort.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples') diff --git a/examples/tree-custom-sort.cxx b/examples/tree-custom-sort.cxx index 36a662560..c0e0b16c7 100644 --- a/examples/tree-custom-sort.cxx +++ b/examples/tree-custom-sort.cxx @@ -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); } -- cgit v1.2.3