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:
Loic Blot 2017-07-25 08:39:42 +02:00
parent 4a4eba7a6c
commit 31b84ce1f2
No known key found for this signature in database
GPG Key ID: EFAA458E8C153987
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
////

@ -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;