MCPcopy Create free account
hub / github.com/ddnet/ddnet / IsFavorite

Method IsFavorite

src/engine/client/favorites.cpp:84–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84TRISTATE CFavorites::IsFavorite(const NETADDR *pAddrs, int NumAddrs) const
85{
86 bool All = true;
87 bool None = true;
88 for(int i = 0; i < NumAddrs && (All || None); i++)
89 {
90 const CEntry *pEntry = Entry(pAddrs[i]);
91 if(pEntry)
92 {
93 None = false;
94 }
95 else
96 {
97 All = false;
98 }
99 }
100 // Return ALL if no addresses were passed.
101 if(All)
102 {
103 return TRISTATE::ALL;
104 }
105 else if(None)
106 {
107 return TRISTATE::NONE;
108 }
109 else
110 {
111 return TRISTATE::SOME;
112 }
113}
114
115TRISTATE CFavorites::IsPingAllowed(const NETADDR *pAddrs, int NumAddrs) const
116{

Callers 4

AddMethod · 0.45
ReplaceEntryMethod · 0.45
UpdateFromHttpMethod · 0.45
UpdateMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected