| 369 | } |
| 370 | |
| 371 | void ServerList::markAsFavorite(ServerItem* item) { |
| 372 | std::string addrname = item->getAddrName(); |
| 373 | ServerListCache::SRV_STR_MAP::iterator i = serverCache->find(addrname); |
| 374 | if (i != serverCache->end()) { |
| 375 | i->second.favorite = true; |
| 376 | } |
| 377 | |
| 378 | item->favorite = true; |
| 379 | |
| 380 | for (ServerCallbackList::iterator itr = favoritesCallbackList.begin(); |
| 381 | itr != favoritesCallbackList.end(); ++itr) { |
| 382 | (*itr).first(item, (*itr).second); |
| 383 | } |
| 384 | } |
| 385 | |
| 386 | void ServerList::unmarkAsFavorite(ServerItem* item) { |
| 387 | std::string addrname = item->getAddrName(); |
no test coverage detected