From 74681783c610dd6a4565a18986cdc2b398b1a6d4 Mon Sep 17 00:00:00 2001 From: Matt Pharr Date: Sat, 30 Oct 2021 06:31:31 -0700 Subject: [PATCH] Image::WritePFM: remove unnecessary cast --- src/pbrt/util/image.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/pbrt/util/image.cpp b/src/pbrt/util/image.cpp index 9c52aa7..af0943f 100644 --- a/src/pbrt/util/image.cpp +++ b/src/pbrt/util/image.cpp @@ -1685,8 +1685,7 @@ bool Image::WritePFM(const std::string &filename, const ImageMetadata &metadata) scanline[3 * x + c] = GetChannel({x, y}, c); } } - if (fwrite(&scanline[0], sizeof(float), 3 * resolution.x, fp) < - (size_t)(3 * resolution.x)) + if (fwrite(&scanline[0], sizeof(float), 3 * resolution.x, fp) < 3 * resolution.x) goto fail; } -- GitLab