Remove FLOAT aliases from timing paths

This commit is contained in:
notmatthewbeshay 2026-03-16 04:37:56 +11:00
parent 24e10876ff
commit d5d507ae1f
4 changed files with 8 additions and 8 deletions

View file

@ -903,7 +903,7 @@ void MinecraftServer::Suspend() {
QueryPerformanceCounter(&qwNewTime);
qwDeltaTime.QuadPart = qwNewTime.QuadPart - qwTime.QuadPart;
fElapsedTime = fSecsPerTick * ((FLOAT)(qwDeltaTime.QuadPart));
fElapsedTime = fSecsPerTick * static_cast<float>(qwDeltaTime.QuadPart);
// 4J-JEV: Flush stats and call PlayerSessionExit.
for (int iPad = 0; iPad < XUSER_MAX_COUNT; iPad++) {
@ -1272,7 +1272,7 @@ void MinecraftServer::run(__int64 seed, void* lpParameter) {
qwDeltaTime.QuadPart =
qwNewTime.QuadPart - qwTime.QuadPart;
fElapsedTime =
fSecsPerTick * ((FLOAT)(qwDeltaTime.QuadPart));
fSecsPerTick * static_cast<float>(qwDeltaTime.QuadPart);
app.DebugPrintf("Autosave: Elapsed time %f\n",
fElapsedTime);
} break;

View file

@ -728,7 +728,7 @@ void ConsoleSaveFileOriginal::Flush(bool autosave, bool updateThumbnail) {
QueryPerformanceCounter(&qwNewTime);
qwDeltaTime.QuadPart = qwNewTime.QuadPart - qwTime.QuadPart;
fElapsedTime = fSecsPerTick * ((FLOAT)(qwDeltaTime.QuadPart));
fElapsedTime = fSecsPerTick * static_cast<float>(qwDeltaTime.QuadPart);
app.DebugPrintf("Check buffer size: Elapsed time %f\n", fElapsedTime);
PIXEndNamedEvent();
@ -759,7 +759,7 @@ void ConsoleSaveFileOriginal::Flush(bool autosave, bool updateThumbnail) {
QueryPerformanceCounter(&qwNewTime);
qwDeltaTime.QuadPart = qwNewTime.QuadPart - qwTime.QuadPart;
fElapsedTime = fSecsPerTick * ((FLOAT)(qwDeltaTime.QuadPart));
fElapsedTime = fSecsPerTick * static_cast<float>(qwDeltaTime.QuadPart);
app.DebugPrintf("Compress: Elapsed time %f\n", fElapsedTime);
PIXEndNamedEvent();

View file

@ -1344,7 +1344,7 @@ void ConsoleSaveFileSplit::Flush(bool autosave, bool updateThumbnail) {
QueryPerformanceCounter(&qwNewTime);
qwDeltaTime.QuadPart = qwNewTime.QuadPart - qwTime.QuadPart;
fElapsedTime = fSecsPerTick * ((FLOAT)(qwDeltaTime.QuadPart));
fElapsedTime = fSecsPerTick * static_cast<float>(qwDeltaTime.QuadPart);
app.DebugPrintf("Check buffer size: Elapsed time %f\n", fElapsedTime);
PIXEndNamedEvent();
@ -1367,7 +1367,7 @@ void ConsoleSaveFileSplit::Flush(bool autosave, bool updateThumbnail) {
QueryPerformanceCounter(&qwNewTime);
qwDeltaTime.QuadPart = qwNewTime.QuadPart - qwTime.QuadPart;
fElapsedTime = fSecsPerTick * ((FLOAT)(qwDeltaTime.QuadPart));
fElapsedTime = fSecsPerTick * static_cast<float>(qwDeltaTime.QuadPart);
app.DebugPrintf("Compress: Elapsed time %f\n", fElapsedTime);
PIXEndNamedEvent();

View file

@ -3450,8 +3450,8 @@ void Level::checkLight(LightLayer::variety layer, int xc, int yc, int zc,
{
QueryPerformanceCounter( &qwNewTime );
qwDeltaTime2.QuadPart = qwNewTime.QuadPart - qwTime.QuadPart;
fElapsedTime1 = fSecsPerTick * ((FLOAT)(qwDeltaTime1.QuadPart));
fElapsedTime2 = fSecsPerTick * ((FLOAT)(qwDeltaTime2.QuadPart));
fElapsedTime1 = fSecsPerTick * static_cast<float>(qwDeltaTime1.QuadPart);
fElapsedTime2 = fSecsPerTick * static_cast<float>(qwDeltaTime2.QuadPart);
if( ( darktcc > 0 ) | ( tcc > 0 ) )
{
printf("%d %d %d %f + %f = %f\n", darktcc, tcc, darktcc + tcc, fElapsedTime1 * 1000.0f, fElapsedTime2 * 1000.0f, ( fElapsedTime1 + fElapsedTime2 ) * 1000.0f);