forked from Mirrorlandia_minetest/minetest
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
@ -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
|
||||
////
|
||||
|
25
src/server.h
25
src/server.h
@ -65,31 +65,6 @@ enum ClientDeletionReason {
|
||||
CDR_DENY
|
||||
};
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
struct MediaInfo
|
||||
{
|
||||
std::string path;
|
||||
|
Loading…
Reference in New Issue
Block a user