Skip to content

Commit

Permalink
Add attribute [[maybe_unused]] to unused functions
Browse files Browse the repository at this point in the history
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
  • Loading branch information
phprus committed Aug 6, 2022
1 parent 8e30a7e commit d065b80
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/phmap/raw_hash_set_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -932,7 +932,7 @@ struct ProbeStats {
// Ratios total_probe_length/size for every tested table.
std::vector<double> single_table_ratios;

friend ProbeStats operator+(const ProbeStats& a, const ProbeStats& b) {
[[maybe_unused]] friend ProbeStats operator+(const ProbeStats& a, const ProbeStats& b) {
ProbeStats res = a;
res.all_probes_histogram.resize(std::max(res.all_probes_histogram.size(),
b.all_probes_histogram.size()));
Expand Down Expand Up @@ -1016,7 +1016,7 @@ struct ExpectedStats {
std::vector<std::pair<double, double>> pecentile_ratios;
std::vector<std::pair<double, double>> pecentile_probes;

friend std::ostream& operator<<(std::ostream& out, const ExpectedStats& s) {
[[maybe_unused]] friend std::ostream& operator<<(std::ostream& out, const ExpectedStats& s) {
out << "{AvgRatio:" << s.avg_ratio << ", MaxRatio:" << s.max_ratio
<< ", PercentileRatios: [";
for (auto el : s.pecentile_ratios) {
Expand Down

0 comments on commit d065b80

Please sign in to comment.