| 4 | #include "server/ServerManager.h" |
| 5 | |
| 6 | ServerConnection* ServerManager::min() |
| 7 | { |
| 8 | if (conns_.empty()) |
| 9 | return NULL; |
| 10 | |
| 11 | ServerConnection* conn = NULL; |
| 12 | |
| 13 | std::vector<ServerConnection*>::iterator it = conns_.begin(); |
| 14 | for (; it != conns_.end(); ++it) |
| 15 | { |
| 16 | if (conn == NULL || (*it)->get_conns() < conn->get_conns()) |
| 17 | conn = *it; |
| 18 | } |
| 19 | |
| 20 | return conn; |
| 21 | } |
| 22 | |
| 23 | void ServerManager::set(ServerConnection* conn) |
| 24 | { |
no test coverage detected