From 28be145a70c8cf4153e403f9aea26325bee1d2e1 Mon Sep 17 00:00:00 2001 From: Sofia Date: Thu, 16 Apr 2026 20:01:30 +0300 Subject: [PATCH] Remove const array formatting --- src/types.cpp | 4 +--- test.c | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/types.cpp b/src/types.cpp index 35612a4..764c8aa 100644 --- a/src/types.cpp +++ b/src/types.cpp @@ -162,9 +162,7 @@ namespace types { std::string ArrayType::formatted() { std::stringstream out{ "" }; - if (this->m_const) - out << "const[] "; - + // Arrays are always constant, no reason to format it. out << this->m_inner->formatted(); out << "[" << this->m_size << "]"; return out.str(); diff --git a/test.c b/test.c index d6d8ae9..377779e 100644 --- a/test.c +++ b/test.c @@ -6,7 +6,7 @@ int fibonacci(int n) { return fibonacci(n - 1) + fibonacci(n - 2); } -void change_first(char* otus) { +void change_first(char otus[5]) { otus[0] = 115; }