format everything

This commit is contained in:
Tropical
2026-04-01 13:48:29 -05:00
parent 3e813592e4
commit dd93cfe91e
380 changed files with 2698 additions and 2595 deletions
@@ -25,14 +25,14 @@ inline std::int64_t QueryPerformanceCounter() {
// Ticks per second for the high-resolution counter.
inline std::int64_t QueryPerformanceFrequency() {
return static_cast<std::int64_t>(std::chrono::steady_clock::period::den)
/ static_cast<std::int64_t>(std::chrono::steady_clock::period::num);
return static_cast<std::int64_t>(std::chrono::steady_clock::period::den) /
static_cast<std::int64_t>(std::chrono::steady_clock::period::num);
}
// Elapsed seconds between two counter values.
inline double ElapsedSeconds(std::int64_t start, std::int64_t end) {
return static_cast<double>(end - start)
/ static_cast<double>(QueryPerformanceFrequency());
return static_cast<double>(end - start) /
static_cast<double>(QueryPerformanceFrequency());
}
} // namespace PlatformTime
@@ -15,5 +15,5 @@ void PerformanceTimer::PrintElapsedTime(const std::wstring& description) {
std::chrono::steady_clock::now() - m_startTime;
fprintf(stderr, "TIMER: %ls: Elapsed time %f\n", description.c_str(),
elapsedTime.count());
elapsedTime.count());
}
+4 -6
View File
@@ -64,7 +64,7 @@ int32_t Compression::CompressLZXRLE(void* pDestination, unsigned int* pDestSize,
// 0 - 254 - encodes a single byte
// 255 followed by 0, 1, 2 - encodes a 1, 2, or 3 255s
// 255 followed by 3-255, followed by a byte - encodes a run of n + 1 bytes
do {
do {
unsigned char thisOne = *pucIn++;
unsigned int count = 1;
@@ -89,10 +89,9 @@ int32_t Compression::CompressLZXRLE(void* pDestination, unsigned int* pDestSize,
}
} while (pucIn != pucEnd);
unsigned int rleSize = (unsigned int)(pucOut - rleCompressBuf);
Compress(pDestination, pDestSize, rleCompressBuf, rleSize);
Compress(pDestination, pDestSize, rleCompressBuf, rleSize);
// printf("Compressed from %d to %d to %d\n",SrcSize,rleSize,*pDestSize);
return 0;
@@ -114,7 +113,7 @@ int32_t Compression::CompressRLE(void* pDestination, unsigned int* pDestSize,
// 255 followed by 0, 1, 2 - encodes a 1, 2, or 3 255s
// 255 followed by 3-255, followed by a byte - encodes a run of n + 1
// bytes
do {
do {
unsigned char thisOne = *pucIn++;
unsigned int count = 1;
@@ -139,7 +138,6 @@ int32_t Compression::CompressRLE(void* pDestination, unsigned int* pDestSize,
}
} while (pucIn != pucEnd);
rleSize = (unsigned int)(pucOut - rleCompressBuf);
}
// Return