mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Cpp11 patchset 11: continue working on constructor style migration (#6004)
This commit is contained in:
parent
8f7785771b
commit
4faaadc8d5
39 changed files with 200 additions and 396 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue