Skip to content

Commit

Permalink
Merge pull request #127 from peter-kutak/peter-kutak-patch-1
Browse files Browse the repository at this point in the history
Rename round function to avoid conflict
  • Loading branch information
franku committed Oct 30, 2018
1 parent 40a50c3 commit 25d6a98
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/lib/bsnprintf.cc
Expand Up @@ -618,7 +618,7 @@ static LDOUBLE pow10(int exp)
return result;
}

static int64_t round(LDOUBLE value)
static int64_t roundtoint(LDOUBLE value)
{
int64_t intpart;

Expand Down Expand Up @@ -685,7 +685,7 @@ static int32_t fmtfp(char *buffer, int32_t currlen, int32_t maxlen,
/* We "cheat" by converting the fractional part to integer by
* multiplying by a factor of 10
*/
fracpart = round((pow10(max)) * (ufvalue - intpart));
fracpart = roundtoint((pow10(max)) * (ufvalue - intpart));

if (fracpart >= pow10(max)) {
intpart++;
Expand Down

0 comments on commit 25d6a98

Please sign in to comment.