Skip to content

Commit

Permalink
style: rename variable to reduce variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
GuilhermeGiacomoSimoes committed Dec 23, 2023
1 parent 2e406af commit 8cdf6ee
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions int2fpstr.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ inline char *int2fpstr(int number, int decimal_places)
return NULL;
}

int buf_index = 30;
int count_decimal_place = 0;
int c_dec_places = 0;
int point_include = decimal_places < 1;

int neg = number < 0;
Expand All @@ -41,9 +40,9 @@ inline char *int2fpstr(int number, int decimal_places)
for (; number && buf_index;
--buf_index, number /= 10)
{
count_decimal_place++;
c_dec_places++;
if (!point_include
&& count_decimal_place > decimal_places)
&& c_dec_places > decimal_places)
{
buffer[buf_index--] = '.';
point_include = 1;
Expand Down

0 comments on commit 8cdf6ee

Please sign in to comment.