use unordered set

This commit is contained in:
FutureRave 2021-10-04 21:33:46 +01:00
parent 75a5200055
commit e2de20c2aa
No known key found for this signature in database
GPG Key ID: E883E2BC9657D955
2 changed files with 3 additions and 3 deletions

View File

@ -3,7 +3,7 @@
namespace Components
{
Utils::Signal<Scheduler::Callback> Dvar::RegistrationSignal;
std::vector<std::string> Dvar::ChangedDvars;
std::unordered_set<std::string> Dvar::ChangedDvars;
Dvar::Var::Var(const std::string& dvarName) : Var()
{
@ -282,7 +282,7 @@ namespace Components
void Dvar::DvarSetFromStringByNameStub(const char* var, const char* value)
{
Dvar::ChangedDvars.push_back(var);
Dvar::ChangedDvars.emplace(var);
Utils::Hook::Call<void(const char*, const char*)>(0x4F52E0)(var, value);
}

View File

@ -55,7 +55,7 @@ namespace Components
private:
static Utils::Signal<Scheduler::Callback> RegistrationSignal;
static std::vector<std::string> ChangedDvars;
static std::unordered_set<std::string> ChangedDvars;
static Game::dvar_t* RegisterName(const char* name, const char* defaultVal, Game::dvar_flag flag, const char* description);