mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 08:35:20 +02: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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user