- replaced MIN/MAX in common code.

This commit is contained in:
Christoph Oelckers 2021-10-30 10:46:17 +02:00
commit eb69bbcae0
63 changed files with 200 additions and 236 deletions

View file

@ -309,7 +309,7 @@ void VulkanFrameBuffer::WaitForCommands(bool finish, bool uploadOnly)
swapChain->QueuePresent(presentImageIndex, mRenderFinishedSemaphore.get());
}
int numWaitFences = MIN(mNextSubmit, (int)maxConcurrentSubmitCount);
int numWaitFences = min(mNextSubmit, (int)maxConcurrentSubmitCount);
if (numWaitFences > 0)
{
@ -345,8 +345,8 @@ void VulkanFrameBuffer::RenderTextureView(FCanvasTexture* tex, std::function<voi
IntRect bounds;
bounds.left = bounds.top = 0;
bounds.width = std::min(tex->GetWidth(), image->Image->width);
bounds.height = std::min(tex->GetHeight(), image->Image->height);
bounds.width = min(tex->GetWidth(), image->Image->width);
bounds.height = min(tex->GetHeight(), image->Image->height);
renderFunc(bounds);
@ -628,7 +628,7 @@ void VulkanFrameBuffer::UpdateGpuStats()
if (q.endIndex <= q.startIndex)
continue;
int64_t timeElapsed = std::max(static_cast<int64_t>(timestamps[q.endIndex] - timestamps[q.startIndex]), (int64_t)0);
int64_t timeElapsed = max(static_cast<int64_t>(timestamps[q.endIndex] - timestamps[q.startIndex]), (int64_t)0);
double timeNS = timeElapsed * timestampPeriod;
FString out;