浏览代码

Fixed #511 and changed formatting

vurtun 7 年之前
父节点
当前提交
3636cb1c5d
共有 1 个文件被更改,包括 7 次插入8 次删除
  1. 7 8
      nuklear.h

+ 7 - 8
nuklear.h

@@ -7970,15 +7970,14 @@ nk_draw_list_push_image(struct nk_draw_list *list, nk_handle texture)
         struct nk_draw_command *prev = nk_draw_list_command_last(list);
         struct nk_draw_command *prev = nk_draw_list_command_last(list);
         if (prev->elem_count == 0) {
         if (prev->elem_count == 0) {
             prev->texture = texture;
             prev->texture = texture;
-#ifdef NK_INCLUDE_COMMAND_USERDATA
+        #ifdef NK_INCLUDE_COMMAND_USERDATA
             prev->userdata = list->userdata;
             prev->userdata = list->userdata;
-#endif
+        #endif
     } else if (prev->texture.id != texture.id
     } else if (prev->texture.id != texture.id
-#ifdef NK_INCLUDE_COMMAND_USERDATA
-               || prev->userdata.id != list->userdata.id
-#endif
-              )
-            nk_draw_list_push_command(list, prev->clip_rect, texture);
+        #ifdef NK_INCLUDE_COMMAND_USERDATA
+            || prev->userdata.id != list->userdata.id
+        #endif
+        ) nk_draw_list_push_command(list, prev->clip_rect, texture);
     }
     }
 }
 }
 
 
@@ -17415,7 +17414,7 @@ nk_clear(struct nk_context *ctx)
             ctx->active = iter->prev;
             ctx->active = iter->prev;
             ctx->end = iter->prev;
             ctx->end = iter->prev;
             if (ctx->active)
             if (ctx->active)
-                ctx->active->flags &= ~NK_WINDOW_ROM;
+                ctx->active->flags &= ~(unsigned)NK_WINDOW_ROM;
         }
         }
         /* free unused popup windows */
         /* free unused popup windows */
         if (iter->popup.win && iter->popup.win->seq != ctx->seq) {
         if (iter->popup.win && iter->popup.win->seq != ctx->seq) {