Skip to content

Commit

Permalink
Fix compilation for Centos 7 removing 'auto' reference
Browse files Browse the repository at this point in the history
Fix compilation for GCC 4.8.5, compiler is not being able to either
handle reference initialization using brace-enclosed initializer lists.
  • Loading branch information
JavierJF committed Jan 25, 2025
1 parent 0a4dc85 commit 5816a7d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/MySQL_Logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1513,7 +1513,7 @@ std::unordered_map<std::string, unsigned long long> MySQL_Logger::getAllMetrics(

void MySQL_Logger::p_update_metrics() {
using ml_c = p_ml_counter;
const auto& counters { this->prom_metrics.p_counter_array };
const auto& counters = this->prom_metrics.p_counter_array;

p_update_counter(counters[ml_c::memory_copy_count], metrics.memoryCopyCount);
p_update_counter(counters[ml_c::disk_copy_count], metrics.diskCopyCount);
Expand All @@ -1529,6 +1529,6 @@ void MySQL_Logger::p_update_metrics() {
p_update_counter(counters[ml_c::circular_buffer_events_dropped_count], MyLogCB->getEventsDroppedCount());

using ml_g = p_ml_gauge;
const auto& gauges { this->prom_metrics.p_gauge_array };
const auto& gauges = this->prom_metrics.p_gauge_array;
gauges[ml_g::circular_buffer_events_size]->Set(MyLogCB->size());
}

0 comments on commit 5816a7d

Please sign in to comment.