Skip to content

Commit

Permalink
Merge pull request #682 from PROP65/func_fix
Browse files Browse the repository at this point in the history
Fixes for nk_strtod, nk_strtof, and nk_strtoi
  • Loading branch information
RobLoach authored Sep 4, 2024
2 parents f7847e6 + 19bb57b commit 4373fd0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/nuklear.h
Original file line number Diff line number Diff line change
Expand Up @@ -3612,11 +3612,11 @@ NK_API struct nk_vec2 nk_rect_size(struct nk_rect);
NK_API int nk_strlen(const char *str);
NK_API int nk_stricmp(const char *s1, const char *s2);
NK_API int nk_stricmpn(const char *s1, const char *s2, int n);
NK_API int nk_strtoi(const char *str, const char **endptr);
NK_API float nk_strtof(const char *str, const char **endptr);
NK_API int nk_strtoi(const char *str, char **endptr);
NK_API float nk_strtof(const char *str, char **endptr);
#ifndef NK_STRTOD
#define NK_STRTOD nk_strtod
NK_API double nk_strtod(const char *str, const char **endptr);
NK_API double nk_strtod(const char *str, char **endptr);
#endif
NK_API int nk_strfilter(const char *text, const char *regexp);
NK_API int nk_strmatch_fuzzy_string(char const *str, char const *pattern, int *out_score);
Expand Down
6 changes: 3 additions & 3 deletions src/nuklear_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ nk_strlen(const char *str)
return siz;
}
NK_API int
nk_strtoi(const char *str, const char **endptr)
nk_strtoi(const char *str, char **endptr)
{
int neg = 1;
const char *p = str;
Expand All @@ -165,7 +165,7 @@ nk_strtoi(const char *str, const char **endptr)
return neg*value;
}
NK_API double
nk_strtod(const char *str, const char **endptr)
nk_strtod(const char *str, char **endptr)
{
double m;
double neg = 1.0;
Expand Down Expand Up @@ -222,7 +222,7 @@ nk_strtod(const char *str, const char **endptr)
return number;
}
NK_API float
nk_strtof(const char *str, const char **endptr)
nk_strtof(const char *str, char **endptr)
{
float float_value;
double double_value;
Expand Down

0 comments on commit 4373fd0

Please sign in to comment.