]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/inventorymanager.cpp
Fix codestyle since CSM Camera API
[dragonfireclient.git] / src / inventorymanager.cpp
index 476768b8c8828752513755359c0794aefa7014ff..c976bd037e557a5676c0642b2c7dcc3153084cf9 100644 (file)
@@ -19,15 +19,14 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 
 #include "inventorymanager.h"
 #include "log.h"
-#include "environment.h"
-#include "scripting_game.h"
+#include "serverenvironment.h"
+#include "scripting_server.h"
 #include "serverobject.h"
 #include "settings.h"
 #include "craftdef.h"
 #include "rollback_interface.h"
-#include "strfnd.h"
-
-#define PP(x) "("<<(x).X<<","<<(x).Y<<","<<(x).Z<<")"
+#include "util/strfnd.h"
+#include "util/basic_macros.h"
 
 #define PLAYER_TO_SA(p)   p->getEnv()->getScriptIface()
 
@@ -818,9 +817,9 @@ void ICraftAction::apply(InventoryManager *mgr,
                // Add the new replacements to the list
                IItemDefManager *itemdef = gamedef->getItemDefManager();
                for (std::vector<ItemStack>::iterator it = temp.begin();
-                               it != temp.end(); it++) {
+                               it != temp.end(); ++it) {
                        for (std::vector<ItemStack>::iterator jt = output_replacements.begin();
-                                       jt != output_replacements.end(); jt++) {
+                                       jt != output_replacements.end(); ++jt) {
                                if (it->name == jt->name) {
                                        *it = jt->addItem(*it, itemdef);
                                        if (it->empty())
@@ -850,7 +849,7 @@ void ICraftAction::apply(InventoryManager *mgr,
        // Put the replacements in the inventory or drop them on the floor, if
        // the invenotry is full
        for (std::vector<ItemStack>::iterator it = output_replacements.begin();
-                       it != output_replacements.end(); it++) {
+                       it != output_replacements.end(); ++it) {
                if (list_main)
                        *it = list_main->addItem(*it);
                if (it->empty())
@@ -886,7 +885,7 @@ bool getCraftingResult(Inventory *inv, ItemStack& result,
                std::vector<ItemStack> &output_replacements,
                bool decrementInput, IGameDef *gamedef)
 {
-       DSTACK(__FUNCTION_NAME);
+       DSTACK(FUNCTION_NAME);
 
        result.clear();