use unordered set
This commit is contained in:
parent
75a5200055
commit
e2de20c2aa
@ -3,7 +3,7 @@
|
|||||||
namespace Components
|
namespace Components
|
||||||
{
|
{
|
||||||
Utils::Signal<Scheduler::Callback> Dvar::RegistrationSignal;
|
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()
|
Dvar::Var::Var(const std::string& dvarName) : Var()
|
||||||
{
|
{
|
||||||
@ -282,7 +282,7 @@ namespace Components
|
|||||||
|
|
||||||
void Dvar::DvarSetFromStringByNameStub(const char* var, const char* value)
|
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);
|
Utils::Hook::Call<void(const char*, const char*)>(0x4F52E0)(var, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ namespace Components
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
static Utils::Signal<Scheduler::Callback> RegistrationSignal;
|
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);
|
static Game::dvar_t* RegisterName(const char* name, const char* defaultVal, Game::dvar_flag flag, const char* description);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user