use "const" where able to + random readability changes

This commit is contained in:
2025-02-04 12:17:42 +01:00
parent c8d43d9564
commit be09d57a27
14 changed files with 84 additions and 92 deletions

View File

@@ -7,7 +7,7 @@
#define MAX_STR_LEN 128
void error(const ErrorCode error_code, const char* format, ...) {
void error(ErrorCode const error_code, char const* const format, ...) {
char buffer[MAX_STR_LEN] = {0}; // contains the buffer of the final string
va_list args = {0};
@@ -21,7 +21,7 @@ void error(const ErrorCode error_code, const char* format, ...) {
exit(error_code);
}
void warn(const char* format, ...) {
void warn(char const* const format, ...) {
char buffer[MAX_STR_LEN] = {0}; // contains the buffer of the final string
va_list args = {0};