EventHandler: Deprecate SetUsed() and Used() as well.

Seems the latter isn't used outside of the functions that were deprecated
in the previous commit and with UsageAnalyzer not making use of this
information unclear why we should keep it around.

Relates to #3187.
This commit is contained in:
Arne Welzel 2023-11-02 18:29:50 +01:00
parent 398122206e
commit ff34a4aa7f
5 changed files with 35 additions and 2 deletions

View file

@ -133,7 +133,10 @@ void activate_bodies__CPP(const char* fn, const char* module, bool exported, Typ
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
}
}
@ -190,7 +193,10 @@ FuncValPtr lookup_func__CPP(string name, int num_bodies, vector<p_hash_type> has
// 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
}
}