]> git.saurik.com Git - wxWidgets.git/commitdiff
Use float instead of double division in wxHashMap code.
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 1 Jun 2012 11:01:34 +0000 (11:01 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 1 Jun 2012 11:01:34 +0000 (11:01 +0000)
We don't need double precision for determining the hash table fill rate and
using double constant also results in float-to-double promotion warnings from
gcc 4.7.

See #14362.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71628 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/hashmap.h

index a2cc550e0f446df4aff20426720d91583a9cda79..9a25f8e183a2b1199ccf0afcd947cfcbc8fa22b9 100644 (file)
@@ -467,7 +467,7 @@ inline bool never_grow( size_t, size_t ) { return false; }
 inline bool never_shrink( size_t, size_t ) { return false; }
 inline bool grow_lf70( size_t buckets, size_t items )
 {
-    return float(items)/float(buckets) >= 0.85;
+    return float(items)/float(buckets) >= 0.85f;
 }
 
 #endif // various hash map implementations