Skip to content

Commit f6a628f

Browse files
committed
Update nuklear.h
1 parent 5a944df commit f6a628f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

nuklear/nuklear.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6627,7 +6627,7 @@ nk_log10(double n)
66276627
NK_LIB float
66286628
nk_roundf(float x)
66296629
{
6630-
return (x >= 0.0) ? nk_ifloorf(x + 0.5) : nk_iceilf(x - 0.5);
6630+
return (x >= 0.0f) ? (float)nk_ifloorf(x + 0.5f) : (float)nk_iceilf(x - 0.5f);
66316631
}
66326632
NK_API struct nk_rect
66336633
nk_get_null_rect(void)
@@ -7415,7 +7415,7 @@ nk_vsnprintf(char *buf, int buf_size, const char *fmt, va_list args)
74157415
/* width argument */
74167416
width = NK_DEFAULT;
74177417
if (*iter >= '1' && *iter <= '9') {
7418-
const char *end;
7418+
char *end;
74197419
width = nk_strtoi(iter, &end);
74207420
if (end == iter)
74217421
width = -1;
@@ -7433,7 +7433,7 @@ nk_vsnprintf(char *buf, int buf_size, const char *fmt, va_list args)
74337433
precision = va_arg(args, int);
74347434
iter++;
74357435
} else {
7436-
const char *end;
7436+
char *end;
74377437
precision = nk_strtoi(iter, &end);
74387438
if (end == iter)
74397439
precision = -1;
@@ -30698,6 +30698,7 @@ nk_tooltipfv(struct nk_context *ctx, const char *fmt, va_list args)
3069830698
/// - [y]: Minor version with non-breaking API and library changes
3069930699
/// - [z]: Patch version with no direct changes to the API
3070030700
///
30701+
/// - 2024/11/20 (4.12.2) - Fix int/float type conversion warnings in `nk_roundf`
3070130702
/// - 2024/03/07 (4.12.1) - Fix bitwise operations warnings in C++20
3070230703
/// - 2023/11/26 (4.12.0) - Added an alignment option to checkboxes and radio buttons.
3070330704
/// - 2023/10/11 (4.11.0) - Added nk_widget_disable_begin() and nk_widget_disable_end()

0 commit comments

Comments
 (0)