| 29 | #include <vector> |
| 30 | |
| 31 | class CSortWrap |
| 32 | { |
| 33 | typedef bool (CServerBrowser::*SortFunc)(int, int) const; |
| 34 | SortFunc m_pfnSort; |
| 35 | CServerBrowser *m_pThis; |
| 36 | |
| 37 | public: |
| 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 | |
| 43 | static bool MatchesPart(const char *a, const char *b) |
| 44 | { |