From d61cdb2d96f50f380667d88762cc8d27a0875f3a Mon Sep 17 00:00:00 2001 From: Syndamia Date: Wed, 23 Jul 2025 14:42:17 +0300 Subject: feat: Minor logic fixes Updated variables names and added breaks where necessary --- src/LEDVideoWall.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/LEDVideoWall.cpp') diff --git a/src/LEDVideoWall.cpp b/src/LEDVideoWall.cpp index f4f4e16..e235aa2 100644 --- a/src/LEDVideoWall.cpp +++ b/src/LEDVideoWall.cpp @@ -76,10 +76,11 @@ LEDVideoWall* LEDVideoWall::fromCommandLine() { std::cerr << "The wall width or height cannot be zero!" << std::endl; continue; } - if (iwall_max_width < panel_width || iwall_max_height < panel_height) { + if (iwall_max_width < ipanel_width || iwall_max_height < ipanel_height) { std::cerr << "The wall cannot be smaller than the panel!" << std::endl; continue; } + break; } while (true); return LEDVideoWall::Freeform(ipanel_width, ipanel_height, iwall_max_width, iwall_max_height); @@ -99,9 +100,10 @@ LEDVideoWall* LEDVideoWall::fromCommandLine() { std::cerr << "The aspect ratio width or height cannot be zero!" << std::endl; continue; } + break; } while (true); - return LEDVideoWall::Aspect(ipanel_width, ipanel_height, i_width, i_height); + return LEDVideoWall::Aspect(ipanel_width, ipanel_height, iaspect_width, iaspect_height); }; } throw std::logic_error("Implementation error: didn't handle all types of LED video walls!"); -- cgit v1.3.1-23-gd82d