Adding of _t to (u)int types, and WChar to char32_t

See: eaae0bb5e
This commit is contained in:
Jonathan G Rennison
2024-01-07 16:41:53 +00:00
parent 55d78a23be
commit 97e6f3062e
655 changed files with 7555 additions and 7555 deletions

View File

@@ -48,7 +48,7 @@ void NewGRFProfiler::BeginResolve(const ResolverObject &resolver)
using namespace std::chrono;
this->cur_call.root_sprite = resolver.root_spritegroup->nfo_line;
this->cur_call.subs = 0;
this->cur_call.time = (uint32)time_point_cast<microseconds>(high_resolution_clock::now()).time_since_epoch().count();
this->cur_call.time = (uint32_t)time_point_cast<microseconds>(high_resolution_clock::now()).time_since_epoch().count();
this->cur_call.tick = _tick_counter;
this->cur_call.cb = resolver.callback;
this->cur_call.feat = resolver.GetFeature();
@@ -61,7 +61,7 @@ void NewGRFProfiler::BeginResolve(const ResolverObject &resolver)
void NewGRFProfiler::EndResolve(const SpriteGroup *result)
{
using namespace std::chrono;
this->cur_call.time = (uint32)time_point_cast<microseconds>(high_resolution_clock::now()).time_since_epoch().count() - this->cur_call.time;
this->cur_call.time = (uint32_t)time_point_cast<microseconds>(high_resolution_clock::now()).time_since_epoch().count() - this->cur_call.time;
if (result == nullptr) {
this->cur_call.result = 0;
@@ -91,7 +91,7 @@ void NewGRFProfiler::Start()
this->start_tick = _tick_counter;
}
uint32 NewGRFProfiler::Finish()
uint32_t NewGRFProfiler::Finish()
{
if (!this->active) return 0;
@@ -108,7 +108,7 @@ uint32 NewGRFProfiler::Finish()
FILE *f = FioFOpenFile(filename, "wt", Subdirectory::NO_DIRECTORY);
FileCloser fcloser(f);
uint32 total_microseconds = 0;
uint32_t total_microseconds = 0;
fputs("Tick,Sprite,Feature,Item,CallbackID,Microseconds,Depth,Result\n", f);
for (const Call &c : this->calls) {
@@ -141,12 +141,12 @@ std::string NewGRFProfiler::GetOutputFilename() const
return std::string(filepath);
}
/* static */ uint32 NewGRFProfiler::FinishAll()
/* static */ uint32_t NewGRFProfiler::FinishAll()
{
NewGRFProfiler::AbortTimer();
uint64 max_ticks = 0;
uint32 total_microseconds = 0;
uint64_t max_ticks = 0;
uint32_t total_microseconds = 0;
for (NewGRFProfiler &pr : _newgrf_profilers) {
if (pr.active) {
total_microseconds += pr.Finish();
@@ -172,7 +172,7 @@ static TimeoutTimer<TimerGameTick> _profiling_finish_timeout(0, []()
/**
* Start the timeout timer that will finish all profiling sessions.
*/
/* static */ void NewGRFProfiler::StartTimer(uint64 ticks)
/* static */ void NewGRFProfiler::StartTimer(uint64_t ticks)
{
_profiling_finish_timeout.Reset(ticks);
}