aboutsummaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorVincent Glize <vincentglize@hotmail.fr>2017-07-01 14:07:40 +0200
committerLoïc Blot <nerzhul@users.noreply.github.com>2017-07-01 14:07:40 +0200
commitc772e0e18c90e48f237e37a45230a1dacd945786 (patch)
treee49cf015a04de64c43e044be0dddfa483fb8ad77 /src/network
parent6e5588c8e1a6cf79005b5e95c75cbfacf7c75589 (diff)
downloadminetest-c772e0e18c90e48f237e37a45230a1dacd945786.tar.gz
minetest-c772e0e18c90e48f237e37a45230a1dacd945786.tar.bz2
minetest-c772e0e18c90e48f237e37a45230a1dacd945786.zip
C++11 cleanup inventorymanager (#6077)
* C++11 cleanup inventorymanager
Diffstat (limited to 'src/network')
-rw-r--r--src/network/serverpackethandler.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/network/serverpackethandler.cpp b/src/network/serverpackethandler.cpp
index da421b36d..a2882b2e7 100644
--- a/src/network/serverpackethandler.cpp
+++ b/src/network/serverpackethandler.cpp
@@ -908,7 +908,7 @@ void Server::handleCommand_InventoryAction(NetworkPacket* pkt)
std::istringstream is(datastring, std::ios_base::binary);
// Create an action
InventoryAction *a = InventoryAction::deSerialize(is);
- if (a == NULL) {
+ if (!a) {
infostream << "TOSERVER_INVENTORY_ACTION: "
<< "InventoryAction::deSerialize() returned NULL"
<< std::endl;
@@ -927,7 +927,7 @@ void Server::handleCommand_InventoryAction(NetworkPacket* pkt)
/*
Handle restrictions and special cases of the move action
*/
- if (a->getType() == IACTION_MOVE) {
+ if (a->getType() == IAction::Move) {
IMoveAction *ma = (IMoveAction*)a;
ma->from_inv.applyCurrentPlayer(player->getName());
@@ -982,7 +982,7 @@ void Server::handleCommand_InventoryAction(NetworkPacket* pkt)
/*
Handle restrictions and special cases of the drop action
*/
- else if (a->getType() == IACTION_DROP) {
+ else if (a->getType() == IAction::Drop) {
IDropAction *da = (IDropAction*)a;
da->from_inv.applyCurrentPlayer(player->getName());
@@ -1018,7 +1018,7 @@ void Server::handleCommand_InventoryAction(NetworkPacket* pkt)
/*
Handle restrictions and special cases of the craft action
*/
- else if (a->getType() == IACTION_CRAFT) {
+ else if (a->getType() == IAction::Craft) {
ICraftAction *ca = (ICraftAction*)a;
ca->craft_inv.applyCurrentPlayer(player->getName());