2
0
Эх сурвалжийг харах

Nullkiller: remove PRI* print macroses

Andrii Danylchenko 4 жил өмнө
parent
commit
2798dcd6c5

+ 2 - 2
AI/Nullkiller/Behaviors/CaptureObjectsBehavior.cpp

@@ -56,7 +56,7 @@ Goals::TGoalVec CaptureObjectsBehavior::getTasks()
 			std::shared_ptr<ExecuteHeroChain> closestWay;
 					
 #ifdef VCMI_TRACE_PATHFINDER
-			logAi->trace("Found %" PRId32 "paths", paths.size());
+			logAi->trace("Found %d paths", paths.size());
 #endif
 
 			for(auto & path : paths)
@@ -82,7 +82,7 @@ Goals::TGoalVec CaptureObjectsBehavior::getTasks()
 				
 #ifdef VCMI_TRACE_PATHFINDER
 				logAi->trace(
-					"It is %s to visit %s by %s with army %" PRId64 ", danger %" PRId64 " and army loss %" PRId64, 
+					"It is %s to visit %s by %s with army %lld, danger %lld and army loss %lld", 
 					isSafe ? "safe" : "not safe",
 					objToVisit->instanceName, 
 					hero->name,

+ 1 - 1
AI/Nullkiller/Goals/ExecuteHeroChain.cpp

@@ -74,7 +74,7 @@ void ExecuteHeroChain::accept(VCAI * ai)
 			continue;
 		}
 
-		logAi->debug("Executing chain node %" PRId32 ". Moving hero %s to %s", i, hero.name, node.coord.toString());
+		logAi->debug("Executing chain node %d. Moving hero %s to %s", i, hero.name, node.coord.toString());
 
 		try
 		{

+ 1 - 2
AI/Nullkiller/Pathfinding/AINodeStorage.h

@@ -10,7 +10,7 @@
 
 #pragma once
 
-#define VCMI_TRACE_PATHFINDER 0
+#undef VCMI_TRACE_PATHFINDER
 
 #include "../../../lib/CPathfinder.h"
 #include "../../../lib/mapObjects/CGHeroInstance.h"
@@ -19,7 +19,6 @@
 #include "../Goals/AbstractGoal.h"
 #include "Actions/ISpecialAction.h"
 #include "Actors.h"
-#include <inttypes.h>
 
 struct AIPathNode : public CGPathNode
 {

+ 2 - 2
AI/Nullkiller/Pathfinding/AIPathfinder.cpp

@@ -64,10 +64,10 @@ void AIPathfinder::updatePaths(std::vector<HeroPtr> heroes, bool useHeroChain)
 	auto config = std::make_shared<AIPathfinding::AIPathfinderConfig>(cb, ai, storage);
 
 	do {
-		logAi->trace("Recalculate paths pass %" PRIi32, pass++);
+		logAi->trace("Recalculate paths pass %d", pass++);
 		cb->calculatePaths(config);
 
-		logAi->trace("Recalculate chain pass %" PRIi32, pass);
+		logAi->trace("Recalculate chain pass %d", pass);
 		useHeroChain = useHeroChain && storage->calculateHeroChain();
 	} while(useHeroChain);
 }