Remove EventRegistry::Used and EventRegistry::SetUsed

This commit is contained in:
Tim Wojtulewicz 2024-08-02 11:05:56 -07:00
parent 97fa7cdc0a
commit e2b03681d1
11 changed files with 6 additions and 111 deletions

View file

@ -131,13 +131,8 @@ void activate_bodies__CPP(const char* fn, const char* module, bool exported, Typ
events.insert(cs.events.begin(), cs.events.end());
}
for ( const auto& e : events ) {
auto eh = event_registry->Register(e);
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
eh->SetUsed();
#pragma GCC diagnostic pop
}
for ( const auto& e : events )
event_registry->Register(e);
}
IDPtr lookup_global__CPP(const char* g, const TypePtr& t, bool exported) {
@ -191,13 +186,8 @@ FuncValPtr lookup_func__CPP(string name, int num_bodies, vector<p_hash_type> has
// This might register the same event more than once,
// if it's used in multiple bodies, but that's okay as
// the semantics for Register explicitly allow it.
for ( auto& e : f.events ) {
auto eh = event_registry->Register(e);
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
eh->SetUsed();
#pragma GCC diagnostic pop
}
for ( auto& e : f.events )
event_registry->Register(e);
}
auto sf = make_intrusive<ScriptFunc>(std::move(name), std::move(ft), std::move(bodies), std::move(priorities));