From 57aa6a7300ac9a03b9ed6f76eb42418cdc194168 Mon Sep 17 00:00:00 2001 From: Sandipsinh Rathod Date: Fri, 11 Oct 2024 13:32:32 -0400 Subject: [PATCH] fix warns --- main.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/main.cpp b/main.cpp index e4841a2..7fa7234 100644 --- a/main.cpp +++ b/main.cpp @@ -247,9 +247,7 @@ void printBoard(char **board, int x, int y) { for (int i = 0; i < x; ++i) { int length = 2 + (i >= 10 ? 2 : 1); for(int j = 0; j < y; ++j) { - if ((int)ans[i + 2][j + 2].size() > length) { - length = ans[i + 2][j + 2].size(); - } + length = max(length, (int)ans[i + 2][j + 2].size()); } maxLength = max(maxLength, length); }