mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Move MapEditEventAreaIgnorer to emerge.cpp
It's only used in emerge threads and it's a local object, don't expose it to the whole Minetest
This commit is contained in:
parent
4a4eba7a6c
commit
31b84ce1f2
2 changed files with 25 additions and 25 deletions
|
@ -85,6 +85,31 @@ private:
|
|||
friend class EmergeManager;
|
||||
};
|
||||
|
||||
class MapEditEventAreaIgnorer
|
||||
{
|
||||
public:
|
||||
MapEditEventAreaIgnorer(VoxelArea *ignorevariable, const VoxelArea &a):
|
||||
m_ignorevariable(ignorevariable)
|
||||
{
|
||||
if(m_ignorevariable->getVolume() == 0)
|
||||
*m_ignorevariable = a;
|
||||
else
|
||||
m_ignorevariable = NULL;
|
||||
}
|
||||
|
||||
~MapEditEventAreaIgnorer()
|
||||
{
|
||||
if(m_ignorevariable)
|
||||
{
|
||||
assert(m_ignorevariable->getVolume() != 0);
|
||||
*m_ignorevariable = VoxelArea();
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
VoxelArea *m_ignorevariable;
|
||||
};
|
||||
|
||||
////
|
||||
//// EmergeManager
|
||||
////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue