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

Class CSortWrap

src/engine/client/serverbrowser.cpp:31–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29#include <vector>
30
31class CSortWrap
32{
33 typedef bool (CServerBrowser::*SortFunc)(int, int) const;
34 SortFunc m_pfnSort;
35 CServerBrowser *m_pThis;
36
37public:
38 CSortWrap(CServerBrowser *pServer, SortFunc Func) :
39 m_pfnSort(Func), m_pThis(pServer) {}
40 bool operator()(int a, int b) { return (g_Config.m_BrSortOrder ? (m_pThis->*m_pfnSort)(b, a) : (m_pThis->*m_pfnSort)(a, b)); }
41};
42
43static bool MatchesPart(const char *a, const char *b)
44{

Callers 1

SortMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected