Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/wolfpld/tracy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartosz Taudul <wolf@nereid.pl>2021-12-01 23:44:56 +0300
committerBartosz Taudul <wolf@nereid.pl>2021-12-01 23:44:56 +0300
commit1a0cf3ff46274a070ec64732b1ea01f8f68f8755 (patch)
tree56a0530021c8086f833f47415b17197f1da8031d
parentce7faf99c9fd3c310b0550f4fc55bcfa2f0c4ec6 (diff)
Update robin_hood to 3.11.3.
-rw-r--r--server/tracy_robin_hood.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/server/tracy_robin_hood.h b/server/tracy_robin_hood.h
index 7e449c72..1d817e0e 100644
--- a/server/tracy_robin_hood.h
+++ b/server/tracy_robin_hood.h
@@ -36,18 +36,18 @@
// see https://semver.org/
#define ROBIN_HOOD_VERSION_MAJOR 3 // for incompatible API changes
#define ROBIN_HOOD_VERSION_MINOR 11 // for adding functionality in a backwards-compatible manner
-#define ROBIN_HOOD_VERSION_PATCH 1 // for backwards-compatible bug fixes
+#define ROBIN_HOOD_VERSION_PATCH 3 // for backwards-compatible bug fixes
#include <algorithm>
#include <cstdlib>
#include <cstring>
#include <functional>
+#include <limits>
#include <memory> // only to support hash of smart pointers
#include <stdexcept>
#include <string>
#include <type_traits>
#include <utility>
-#include <limits>
#if __cplusplus >= 201703L
# include <string_view>
#endif
@@ -2427,15 +2427,14 @@ private:
<< (static_cast<double>(mNumElements) * 100.0 /
(static_cast<double>(mMask) + 1)))
- nextHashMultiplier();
if (mNumElements * 2 < calcMaxNumElementsAllowed(mMask + 1)) {
// we have to resize, even though there would still be plenty of space left!
// Try to rehash instead. Delete freed memory so we don't steadyily increase mem in case
// we have to rehash a few times
+ nextHashMultiplier();
rehashPowerOfTwo(mMask + 1, true);
} else {
- // Each resize use a different hash so we don't so easily overflow.
- // Make sure we only have odd numbers, so that the multiplication is reversible!
+ // we've reached the capacity of the map, so the hash seems to work nice. Keep using it.
rehashPowerOfTwo((mMask + 1) * 2, false);
}
return true;