forked from thepeacockproject/Peacock
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpatches.cpp
More file actions
26 lines (22 loc) · 725 Bytes
/
Copy pathpatches.cpp
File metadata and controls
26 lines (22 loc) · 725 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include "patches.h"
#include "patch_definitions/definitions.h"
namespace peacock {
PatchRegistry &PatchRegistry::instance() {
static PatchRegistry reg;
return reg;
}
PatchRegistry::PatchRegistry() {
patch_definitions::add_v3_260_1(*this);
patch_definitions::add_v3_270_1(*this);
}
void PatchRegistry::add_version(uint32_t identifier, HitmanVersion version) {
versions_.emplace(identifier, std::move(version));
}
const HitmanVersion *
PatchRegistry::find_version(const uint32_t identifier) const {
const auto it = versions_.find(identifier);
if (it != versions_.end())
return &it->second;
return nullptr;
}
}