mirror of
https://github.com/google/brotli.git
synced 2024-11-25 04:50:05 +00:00
Fully qualify std::max_element, std::push_heap and std::pop_heap names.
This commit is contained in:
parent
c0d7498031
commit
5bc56a17ee
@ -342,7 +342,7 @@ void MoveToFront(std::vector<int>* v, int index) {
|
||||
|
||||
std::vector<int> MoveToFrontTransform(const std::vector<int>& v) {
|
||||
if (v.empty()) return v;
|
||||
std::vector<int> mtf(*max_element(v.begin(), v.end()) + 1);
|
||||
std::vector<int> mtf(*std::max_element(v.begin(), v.end()) + 1);
|
||||
for (int i = 0; i < mtf.size(); ++i) mtf[i] = i;
|
||||
std::vector<int> result(v.size());
|
||||
for (int i = 0; i < v.size(); ++i) {
|
||||
|
@ -102,7 +102,7 @@ void CompareAndPushToHeap(const HistogramType* out,
|
||||
if (store_pair) {
|
||||
p.cost_diff += p.cost_combo;
|
||||
pairs->push_back(p);
|
||||
push_heap(pairs->begin(), pairs->end(), HistogramPairComparator());
|
||||
std::push_heap(pairs->begin(), pairs->end(), HistogramPairComparator());
|
||||
}
|
||||
}
|
||||
|
||||
@ -165,7 +165,7 @@ void HistogramCombine(HistogramType* out,
|
||||
}
|
||||
// Pop invalid pairs from the top of the heap.
|
||||
while (!pairs.empty() && !pairs[0].valid) {
|
||||
pop_heap(pairs.begin(), pairs.end(), HistogramPairComparator());
|
||||
std::pop_heap(pairs.begin(), pairs.end(), HistogramPairComparator());
|
||||
pairs.pop_back();
|
||||
}
|
||||
// Push new pairs formed with the combined histogram to the heap.
|
||||
|
Loading…
Reference in New Issue
Block a user