From 16405fd4755b7294db57da2757b61a313fd1c030 Mon Sep 17 00:00:00 2001 From: Laurin Date: Fri, 2 Feb 2024 20:24:25 +0100 Subject: [PATCH] refactoring: changed read only parameter of function from int to const int --- src/conversionOfNumbers/conversionOfNumbers.c | 2 +- src/conversionOfNumbers/conversionOfNumbers.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/conversionOfNumbers/conversionOfNumbers.c b/src/conversionOfNumbers/conversionOfNumbers.c index 456801d..305d0ad 100644 --- a/src/conversionOfNumbers/conversionOfNumbers.c +++ b/src/conversionOfNumbers/conversionOfNumbers.c @@ -51,7 +51,7 @@ unsigned int convertBinaryStrToInt(char* input){ return result; } -int hexStrLen(int input){ +int hexStrLen(const int input){ int length = 0; if(input == 0) return 1; for (int x = 0; x <= input; x++){ diff --git a/src/conversionOfNumbers/conversionOfNumbers.h b/src/conversionOfNumbers/conversionOfNumbers.h index b897a66..d8ec7ce 100644 --- a/src/conversionOfNumbers/conversionOfNumbers.h +++ b/src/conversionOfNumbers/conversionOfNumbers.h @@ -5,6 +5,6 @@ char* convertIntToBinaryStr(int input); int binaryStrLen(int input); unsigned int convertBinaryStrToInt(char* input); char* convertIntToHex(int input); -int hexStrLen(int input); +int hexStrLen(const int input); #endif \ No newline at end of file