diff options
author | Loic Blot <loic.blot@unix-experience.fr> | 2017-07-25 08:39:42 +0200 |
---|---|---|
committer | Loic Blot <loic.blot@unix-experience.fr> | 2017-07-25 08:47:52 +0200 |
commit | 31b84ce1f2c4f9c6264f32427c3e7be1215360f1 (patch) | |
tree | f7206d06b0b69d0b05ecf93f96a3259f6fe245b9 | |
parent | 4a4eba7a6c513d0b86bcabdf5882e8031c8f07ac (diff) | |
download | minetest-31b84ce1f2c4f9c6264f32427c3e7be1215360f1.tar.gz minetest-31b84ce1f2c4f9c6264f32427c3e7be1215360f1.tar.bz2 minetest-31b84ce1f2c4f9c6264f32427c3e7be1215360f1.zip |
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
-rw-r--r-- | src/emerge.cpp | 25 | ||||
-rw-r--r-- | src/server.h | 25 |
2 files changed, 25 insertions, 25 deletions
diff --git a/src/emerge.cpp b/src/emerge.cpp index f5852aaae..0fc31e9e1 100644 --- a/src/emerge.cpp +++ b/src/emerge.cpp @@ -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 //// diff --git a/src/server.h b/src/server.h index fff7f9b6a..ac7ba4f61 100644 --- a/src/server.h +++ b/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; |