Initial uses of scope guard logging.
This commit is contained in:
@@ -52,6 +52,8 @@
|
||||
#include "gamelog.h"
|
||||
#include "linkgraph/linkgraph.h"
|
||||
#include "linkgraph/refresh.h"
|
||||
#include "string_func.h"
|
||||
#include "scope_info.h"
|
||||
|
||||
#include "table/strings.h"
|
||||
|
||||
@@ -849,8 +851,10 @@ static void RunVehicleDayProc()
|
||||
if (_game_mode != GM_NORMAL) return;
|
||||
|
||||
/* Run the day_proc for every DAY_TICKS vehicle starting at _date_fract. */
|
||||
Vehicle *v = NULL;
|
||||
SCOPE_INFO_FMT([&v], "RunVehicleDayProc: %s", DumpVehicleInfo(v));
|
||||
for (size_t i = _date_fract; i < Vehicle::GetPoolSize(); i += DAY_TICKS) {
|
||||
Vehicle *v = Vehicle::Get(i);
|
||||
v = Vehicle::Get(i);
|
||||
if (v == NULL) continue;
|
||||
|
||||
/* Call the 32-day callback if needed */
|
||||
@@ -883,7 +887,8 @@ void CallVehicleTicks()
|
||||
Station *st;
|
||||
FOR_ALL_STATIONS(st) LoadUnloadStation(st);
|
||||
|
||||
Vehicle *v;
|
||||
Vehicle *v = NULL;
|
||||
SCOPE_INFO_FMT([&v], "CallVehicleTicks: %s", DumpVehicleInfo(v));
|
||||
FOR_ALL_VEHICLES(v) {
|
||||
/* Vehicle could be deleted in this tick */
|
||||
if (!v->Tick()) {
|
||||
@@ -952,6 +957,7 @@ void CallVehicleTicks()
|
||||
}
|
||||
}
|
||||
}
|
||||
v = NULL;
|
||||
|
||||
Backup<CompanyByte> cur_company(_current_company, FILE_LINE);
|
||||
for (AutoreplaceMap::iterator it = _vehicles_to_autoreplace.Begin(); it != _vehicles_to_autoreplace.End(); it++) {
|
||||
|
Reference in New Issue
Block a user