Skip to content

Commit fd574f1

Browse files
committed
Do not use structured binding
1 parent 9e23226 commit fd574f1

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

ddsketch/include/ddsketch.hpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@
2020
#ifndef _DDSKETCH_HPP_
2121
#define _DDSKETCH_HPP_
2222

23-
#include <utility>
24-
#include <type_traits>
25-
#include <variant>
26-
#include "store_factory.hpp"
2723
#include "common_defs.hpp"
2824
#include "memory_operations.hpp"
2925

ddsketch/include/dense_store_impl.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
#define DENSE_STORE_IMPL_HPP
2222

2323
#include <algorithm>
24-
#include <filesystem>
2524

2625
#include "common_defs.hpp"
2726

ddsketch/test/DDSketchTest.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ void test_adding(SketchType& sketch, const std::vector<double>& values, double r
9797
// Test individual additions
9898
sketch.clear();
9999
for (const double& value : values) {
100-
sketch.update(value);
100+
sketch.update(value);
101101
}
102102
assert_encodes(sketch, values, relative_accuracy);
103103

@@ -106,11 +106,13 @@ void test_adding(SketchType& sketch, const std::vector<double>& values, double r
106106
auto sketch_weighted(sketch);
107107
std::map<double, int> value_counts;
108108
for (const double& value : values) {
109-
value_counts[value]++;
109+
value_counts[value]++;
110110
}
111111

112-
for (const auto& [value, count] : value_counts) {
113-
sketch_weighted.update(value, count);
112+
for (const auto& value_count : value_counts) {
113+
double value = value_count.first;
114+
double count = value_count.second;
115+
sketch_weighted.update(value, count);
114116
}
115117
assert_encodes(sketch_weighted, values, relative_accuracy);
116118
}

0 commit comments

Comments
 (0)