From 36e6c3786f136ff2ac435003e9cdfaf8acb9386a Mon Sep 17 00:00:00 2001 From: user Date: Tue, 8 Jul 2025 19:47:02 -0400 Subject: [PATCH] cleanup --- Makefile | 2 +- src/Aquarium.cpp | 11 ----------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 29eac28..1577f75 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ # Compiler and flags CXX = g++ -CXXFLAGS = -std=c++17 -Wall -Wextra -O3 +CXXFLAGS = -Wall -Wextra -O3 LDFLAGS = -static # Directories diff --git a/src/Aquarium.cpp b/src/Aquarium.cpp index b459523..9f8cbd5 100644 --- a/src/Aquarium.cpp +++ b/src/Aquarium.cpp @@ -16,8 +16,6 @@ #include #include -int g_maxCells = 0; - // ANSI color codes namespace ANSI { const char *RESET = "\033[0m"; @@ -132,7 +130,6 @@ void Aquarium::redraw() { clearCurrentFrame(); ensureBigEntityExists(); - // Use static vectors to avoid per-frame allocations static std::vector> newEntities; static std::vector entitiesToRemove; @@ -197,14 +194,6 @@ void Aquarium::resize() { getTerminalSize(); - if (g_maxCells && height * width > g_maxCells) { - cleanup_terminal(0); - std::cerr << "Error: Terminal too large. Maximum allowed area is " - << g_maxCells << " cells, but current size is " - << (height * width) << ".\n"; - std::exit(1); - } - currentFrame.assign(height, std::vector(width)); previousFrame.assign(height, std::vector(width));