mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Enhance ABM performance a little bit by removing two std::set copy (#5815)
* Enhance ABM performance a little bit by removing two std::set copy * ActiveBlockModifier::getTriggerContents now returns a const ref * ActiveBlockModifier::getRequiredNeighbors now returns a const ref * ActiveBlockModifier::getRequiredNeighbors is now purely virtual * Little code style fix
This commit is contained in:
parent
5b338638e0
commit
4d5ce8478c
3 changed files with 18 additions and 21 deletions
|
@ -203,11 +203,11 @@ public:
|
|||
m_simple_catch_up(simple_catch_up)
|
||||
{
|
||||
}
|
||||
virtual std::set<std::string> getTriggerContents()
|
||||
virtual const std::set<std::string> &getTriggerContents() const
|
||||
{
|
||||
return m_trigger_contents;
|
||||
}
|
||||
virtual std::set<std::string> getRequiredNeighbors()
|
||||
virtual const std::set<std::string> &getRequiredNeighbors() const
|
||||
{
|
||||
return m_required_neighbors;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue