summaryrefslogtreecommitdiff
path: root/src/rollback_interface.h
diff options
context:
space:
mode:
authorLoïc Blot <nerzhul@users.noreply.github.com>2017-06-18 19:55:15 +0200
committerGitHub <noreply@github.com>2017-06-18 19:55:15 +0200
commit4faaadc8d50d6ab7a19d22bd5a760c4b8321a51f (patch)
tree57ce8401a5f6538024c1f19d37d576fba21e147b /src/rollback_interface.h
parent8f7785771b9e02b1a1daf7a252550d78ea93053d (diff)
downloadminetest-4faaadc8d50d6ab7a19d22bd5a760c4b8321a51f.tar.gz
minetest-4faaadc8d50d6ab7a19d22bd5a760c4b8321a51f.tar.bz2
minetest-4faaadc8d50d6ab7a19d22bd5a760c4b8321a51f.zip
Cpp11 patchset 11: continue working on constructor style migration (#6004)
Diffstat (limited to 'src/rollback_interface.h')
-rw-r--r--src/rollback_interface.h18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/rollback_interface.h b/src/rollback_interface.h
index 92fab9b9c..a5f0c34fc 100644
--- a/src/rollback_interface.h
+++ b/src/rollback_interface.h
@@ -35,8 +35,8 @@ class InventoryManager;
struct RollbackNode
{
std::string name;
- int param1;
- int param2;
+ int param1 = 0;
+ int param2 = 0;
std::string meta;
bool operator == (const RollbackNode &other)
@@ -46,11 +46,7 @@ struct RollbackNode
}
bool operator != (const RollbackNode &other) { return !(*this == other); }
- RollbackNode():
- param1(0),
- param2(0)
- {}
-
+ RollbackNode() {}
RollbackNode(Map *map, v3s16 p, IGameDef *gamedef);
};
@@ -70,7 +66,7 @@ struct RollbackAction
v3s16 p;
RollbackNode n_old;
RollbackNode n_new;
-
+
std::string inventory_location;
std::string inventory_list;
u32 inventory_index;
@@ -103,13 +99,13 @@ struct RollbackAction
inventory_add = add_;
inventory_stack = inventory_stack_;
}
-
+
// String should not contain newlines or nulls
std::string toString() const;
-
+
// Eg. flowing water level changes are not important
bool isImportant(IGameDef *gamedef) const;
-
+
bool getPosition(v3s16 *dst) const;
bool applyRevert(Map *map, InventoryManager *imgr, IGameDef *gamedef) const;