From b80e3581b5b46b7fa6fc55b17c39bc07941ea3fa Mon Sep 17 00:00:00 2001 From: Bob Polis Date: Tue, 30 Jan 2024 13:06:45 +0100 Subject: [PATCH] Remove unnecessary second pixel row fill --- src/pixels.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/pixels.cpp b/src/pixels.cpp index 8ee5fa1..88aba01 100644 --- a/src/pixels.cpp +++ b/src/pixels.cpp @@ -14,11 +14,6 @@ void write_image(std::ostream& os, FILE* in) { pnm_readpamrow(&info, row1.get()); if (y < info.height - 1) { pnm_readpamrow(&info, row2.get()); - } else { - // fill second row with terminal background color - for (int col = 0; col < info.width; ++col) { - t2[col][0] = t2[col][1] = t2[col][2] = 0; - } } for (int x = 0; x < info.width; ++x) { if (info.depth == 3) { // assume RGB, 1 byte per sample