MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / markAsFavorite

Method markAsFavorite

src/game/ServerList.cpp:371–384  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

369}
370
371void 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
386void ServerList::unmarkAsFavorite(ServerItem* item) {
387 std::string addrname = item->getAddrName();

Callers 1

keyPressMethod · 0.80

Calls 4

getAddrNameMethod · 0.80
findMethod · 0.45
endMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected