Browse Source

Replace usage of memset in nk_font_atlas_bake with NK_MEMSET

Komari Spaghetti 4 years ago
parent
commit
f42712c9de
4 changed files with 7 additions and 3 deletions
  1. 4 1
      nuklear.h
  2. 1 1
      package.json
  3. 1 0
      src/CHANGELOG
  4. 1 1
      src/nuklear_font.c

+ 4 - 1
nuklear.h

@@ -17428,7 +17428,7 @@ nk_font_atlas_bake(struct nk_font_atlas *atlas, int *width, int *height,
     tmp = atlas->temporary.alloc(atlas->temporary.userdata,0, tmp_size);
     tmp = atlas->temporary.alloc(atlas->temporary.userdata,0, tmp_size);
     NK_ASSERT(tmp);
     NK_ASSERT(tmp);
     if (!tmp) goto failed;
     if (!tmp) goto failed;
-    memset(tmp,0,tmp_size);
+    NK_MEMSET(tmp,0,tmp_size);
 
 
     /* allocate glyph memory for all fonts */
     /* allocate glyph memory for all fonts */
     baker = nk_font_baker(tmp, atlas->glyph_count, atlas->font_num, &atlas->temporary);
     baker = nk_font_baker(tmp, atlas->glyph_count, atlas->font_num, &atlas->temporary);
@@ -29177,6 +29177,8 @@ nk_tooltipfv(struct nk_context *ctx, const char *fmt, va_list args)
 ///    - [yy]: Minor version with non-breaking API and library changes
 ///    - [yy]: Minor version with non-breaking API and library changes
 ///    - [zz]: Bug fix version with no direct changes to API
 ///    - [zz]: Bug fix version with no direct changes to API
 ///
 ///
+/// - 2021/08/16 (4.07.5) - Replace usage of memset in nk_font_atlas_bake with NK_MEMSET
+/// - 2021/08/15 (4.07.4) - Fix conversion and sign conversion warnings
 /// - 2021/08/08 (4.07.3) - Fix crash when baking merged fonts
 /// - 2021/08/08 (4.07.3) - Fix crash when baking merged fonts
 /// - 2021/08/08 (4.07.2) - Fix Multiline Edit wrong offset
 /// - 2021/08/08 (4.07.2) - Fix Multiline Edit wrong offset
 /// - 2021/03/17 (4.07.1) - Fix warning about unused parameter
 /// - 2021/03/17 (4.07.1) - Fix warning about unused parameter
@@ -29508,3 +29510,4 @@ nk_tooltipfv(struct nk_context *ctx, const char *fmt, va_list args)
 /// in libraries and brought me to create some of my own. Finally Apoorva Joshi
 /// in libraries and brought me to create some of my own. Finally Apoorva Joshi
 /// for his single header file packer.
 /// for his single header file packer.
 */
 */
+

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "nuklear",
   "name": "nuklear",
-  "version": "4.07.4",
+  "version": "4.07.5",
   "repo": "Immediate-Mode-UI/Nuklear",
   "repo": "Immediate-Mode-UI/Nuklear",
   "description": "A small ANSI C gui toolkit",
   "description": "A small ANSI C gui toolkit",
   "keywords": ["gl", "ui", "toolkit"],
   "keywords": ["gl", "ui", "toolkit"],

+ 1 - 0
src/CHANGELOG

@@ -8,6 +8,7 @@
 ///    - [yy]: Minor version with non-breaking API and library changes
 ///    - [yy]: Minor version with non-breaking API and library changes
 ///    - [zz]: Bug fix version with no direct changes to API
 ///    - [zz]: Bug fix version with no direct changes to API
 ///
 ///
+/// - 2021/08/16 (4.07.5) - Replace usage of memset in nk_font_atlas_bake with NK_MEMSET
 /// - 2021/08/15 (4.07.4) - Fix conversion and sign conversion warnings
 /// - 2021/08/15 (4.07.4) - Fix conversion and sign conversion warnings
 /// - 2021/08/08 (4.07.3) - Fix crash when baking merged fonts
 /// - 2021/08/08 (4.07.3) - Fix crash when baking merged fonts
 /// - 2021/08/08 (4.07.2) - Fix Multiline Edit wrong offset
 /// - 2021/08/08 (4.07.2) - Fix Multiline Edit wrong offset

+ 1 - 1
src/nuklear_font.c

@@ -1185,7 +1185,7 @@ nk_font_atlas_bake(struct nk_font_atlas *atlas, int *width, int *height,
     tmp = atlas->temporary.alloc(atlas->temporary.userdata,0, tmp_size);
     tmp = atlas->temporary.alloc(atlas->temporary.userdata,0, tmp_size);
     NK_ASSERT(tmp);
     NK_ASSERT(tmp);
     if (!tmp) goto failed;
     if (!tmp) goto failed;
-    memset(tmp,0,tmp_size);
+    NK_MEMSET(tmp,0,tmp_size);
 
 
     /* allocate glyph memory for all fonts */
     /* allocate glyph memory for all fonts */
     baker = nk_font_baker(tmp, atlas->glyph_count, atlas->font_num, &atlas->temporary);
     baker = nk_font_baker(tmp, atlas->glyph_count, atlas->font_num, &atlas->temporary);