diff --git a/lib/MySQL_HostGroups_Manager.cpp b/lib/MySQL_HostGroups_Manager.cpp index cd6d2abb2..ce35b36d2 100644 --- a/lib/MySQL_HostGroups_Manager.cpp +++ b/lib/MySQL_HostGroups_Manager.cpp @@ -3480,12 +3480,12 @@ SQLite3_result * MySQL_HostGroups_Manager::SQL3_Free_Connections() { } void MySQL_HostGroups_Manager::p_update_connection_pool_update_counter(std::string& endpoint_id, std::string& endpoint_addr, std::string& endpoint_port, std::string& hostgroup_id, std::map& m_map, unsigned long long value, p_hg_dyn_counter::metric idx) { - const auto& counter_id { m_map.find(endpoint_id) }; + const auto& counter_id = m_map.find(endpoint_id); if (counter_id != m_map.end()) { - const auto& cur_val { counter_id->second->Value() }; + const auto& cur_val = counter_id->second->Value(); counter_id->second->Increment(value - cur_val); } else { - auto& new_counter { status.p_dyn_counter_array[idx] }; + auto& new_counter = status.p_dyn_counter_array[idx]; m_map.insert( { endpoint_id, @@ -3499,12 +3499,11 @@ void MySQL_HostGroups_Manager::p_update_connection_pool_update_counter(std::stri } void MySQL_HostGroups_Manager::p_update_connection_pool_update_gauge(std::string& endpoint_id, std::string& endpoint_addr, std::string& endpoint_port, std::string& hostgroup_id, std::map& m_map, unsigned long long value, p_hg_dyn_gauge::metric idx) { - const auto& counter_id { m_map.find(endpoint_id) }; + const auto& counter_id = m_map.find(endpoint_id); if (counter_id != m_map.end()) { - const auto& cur_val { counter_id->second->Value() }; counter_id->second->Set(value); } else { - auto& new_counter { status.p_dyn_gauge_array[idx] }; + auto& new_counter = status.p_dyn_gauge_array[idx]; m_map.insert( { endpoint_id, diff --git a/lib/MySQL_Thread.cpp b/lib/MySQL_Thread.cpp index 2e5b74072..baec5b43b 100644 --- a/lib/MySQL_Thread.cpp +++ b/lib/MySQL_Thread.cpp @@ -5802,7 +5802,7 @@ unsigned long long MySQL_Threads_Handler::get_status_variable(enum MySQL_Thread_ } } if (m_idx != p_th_counter::__size) { - const auto& cur_val { status_variables.p_counter_array[m_idx]->Value() }; + const auto& cur_val = status_variables.p_counter_array[m_idx]->Value(); status_variables.p_counter_array[m_idx]->Increment(q - cur_val); } return q;