Browse Source

refactoring: changed read only parameter of function from int to const int

remotes/origin/conversionOfNumbers
Laurin 11 months ago
parent
commit
16405fd475
  1. 2
      src/conversionOfNumbers/conversionOfNumbers.c
  2. 2
      src/conversionOfNumbers/conversionOfNumbers.h

2
src/conversionOfNumbers/conversionOfNumbers.c

@ -51,7 +51,7 @@ unsigned int convertBinaryStrToInt(char* input){
return result; return result;
} }
int hexStrLen(int input){
int hexStrLen(const int input){
int length = 0; int length = 0;
if(input == 0) return 1; if(input == 0) return 1;
for (int x = 0; x <= input; x++){ for (int x = 0; x <= input; x++){

2
src/conversionOfNumbers/conversionOfNumbers.h

@ -5,6 +5,6 @@ char* convertIntToBinaryStr(int input);
int binaryStrLen(int input); int binaryStrLen(int input);
unsigned int convertBinaryStrToInt(char* input); unsigned int convertBinaryStrToInt(char* input);
char* convertIntToHex(int input); char* convertIntToHex(int input);
int hexStrLen(int input);
int hexStrLen(const int input);
#endif #endif
Loading…
Cancel
Save