Make the servers-array in Monitor private

This prevents derived classes from modifying the array directly,
which would be unsafe.
This commit is contained in:
Esa Korhonen
2019-05-15 14:57:28 +03:00
parent 6317a86c69
commit cf46004bd8
6 changed files with 33 additions and 27 deletions

View File

@ -78,7 +78,7 @@ void MariaDBMonitor::reset_server_info()
clear_server_info();
// Next, initialize the data.
for (auto mon_server : Monitor::m_servers)
for (auto mon_server : servers())
{
m_servers.push_back(new MariaDBServer(mon_server, m_servers.size(), m_settings.shared));
}