blob: a13f3bb4ac64a25d8610e61577883de4a067e974 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#pragma once
class apiset {
std::unordered_map<std::string, std::string> m_apimap;
public:
apiset();
bool operator()(std::string &mod) {
auto it = std::find_if(m_apimap.begin(), m_apimap.end(), [&](const std::pair<std::string, std::string>& pair) {
return mod.find(pair.first) != std::string::npos;
});
if (it != m_apimap.end()) {
mod = it->second;
return true;
}
return false;
}
auto &map() { return m_apimap; }
};
extern apiset g_apiset;
|