summaryrefslogtreecommitdiff
path: root/src/map.h
diff options
context:
space:
mode:
authorLoïc Blot <nerzhul@users.noreply.github.com>2017-08-18 18:18:25 +0200
committerGitHub <noreply@github.com>2017-08-18 18:18:25 +0200
commitc42753338924bb29c61081c9f269772f89bcd808 (patch)
tree3ccbf49ad802c57a1288ea978268315b68d8e65f /src/map.h
parentfb196be8cf8606cfab144e2fe62d9c9d1f50932f (diff)
downloadminetest-c42753338924bb29c61081c9f269772f89bcd808.tar.gz
minetest-c42753338924bb29c61081c9f269772f89bcd808.tar.bz2
minetest-c42753338924bb29c61081c9f269772f89bcd808.zip
Modernize various files (src/m*) (#6267)
* Modernize various files (src/m*) * range-based for loops * code style * C++ headers instead of C headers * Default operators * empty function Thanks to clang-tidy
Diffstat (limited to 'src/map.h')
-rw-r--r--src/map.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/map.h b/src/map.h
index 4dd2b7e30..81f32baea 100644
--- a/src/map.h
+++ b/src/map.h
@@ -77,7 +77,7 @@ struct MapEditEvent
std::set<v3s16> modified_blocks;
u16 already_known_by_peer = 0;
- MapEditEvent() {}
+ MapEditEvent() = default;
MapEditEvent * clone()
{
@@ -107,11 +107,7 @@ struct MapEditEvent
case MEET_OTHER:
{
VoxelArea a;
- for(std::set<v3s16>::iterator
- i = modified_blocks.begin();
- i != modified_blocks.end(); ++i)
- {
- v3s16 p = *i;
+ for (v3s16 p : modified_blocks) {
v3s16 np1 = p*MAP_BLOCKSIZE;
v3s16 np2 = np1 + v3s16(1,1,1)*MAP_BLOCKSIZE - v3s16(1,1,1);
a.addPoint(np1);
@@ -216,8 +212,8 @@ public:
bool removeNodeWithEvent(v3s16 p);
// Call these before and after saving of many blocks
- virtual void beginSave() { return; }
- virtual void endSave() { return; }
+ virtual void beginSave() {}
+ virtual void endSave() {}
virtual void save(ModifiedState save_level) { FATAL_ERROR("FIXME"); }