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.pld@gmail.com>2021-01-22 01:02:21 +0300
committerBartosz Taudul <wolf.pld@gmail.com>2021-01-22 01:26:32 +0300
commitdee6395acf1859852b7ee71042872c71159730fd (patch)
tree9f2f4593508717dd81ae34b5e73127b210379921
parent0fc6ebc67d4c0ffd1347edb36b57ba521b960b27 (diff)
Update pdqsort.
https://github.com/orlp/pdqsort/commit/978bc36a9bd4143a54b2551cfd9ce8a6afd6d04c
-rw-r--r--server/tracy_pdqsort.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/tracy_pdqsort.h b/server/tracy_pdqsort.h
index e889e676..105a32f9 100644
--- a/server/tracy_pdqsort.h
+++ b/server/tracy_pdqsort.h
@@ -122,10 +122,8 @@ namespace pdqsort_detail {
typedef typename std::iterator_traits<Iter>::value_type T;
if (begin == end) return true;
- int limit = 0;
+ std::size_t limit = 0;
for (Iter cur = begin + 1; cur != end; ++cur) {
- if (limit > partial_insertion_sort_limit) return false;
-
Iter sift = cur;
Iter sift_1 = cur - 1;
@@ -139,6 +137,8 @@ namespace pdqsort_detail {
*sift = PDQSORT_PREFER_MOVE(tmp);
limit += cur - sift;
}
+
+ if (limit > partial_insertion_sort_limit) return false;
}
return true;
@@ -272,7 +272,7 @@ namespace pdqsort_detail {
}
int l_size = 0, r_size = 0;
- int unknown_left = (last - first) - ((num_r || num_l) ? block_size : 0);
+ int unknown_left = (int)(last - first) - ((num_r || num_l) ? block_size : 0);
if (num_r) {
// Handle leftover block by assigning the unknown elements to the other block.
l_size = unknown_left;