diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-02-07 17:02:18 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-02-07 17:02:18 +0300 |
commit | 6f3e498e7d5e0c772ef795e7301dd332bccada22 (patch) | |
tree | 9d3651565edbf3d4549f9b1f3c924af99d065902 /source/blender/editors/space_node | |
parent | 80415ee2031f1b1b9ef38774fa9a297f7a5018aa (diff) |
Cleanup: use of 'unsigned'
- Replace 'unsigned' used on it's own with 'uint'.
- Replace 'unsigned const char' with 'const uchar'.
Diffstat (limited to 'source/blender/editors/space_node')
-rw-r--r-- | source/blender/editors/space_node/drawnode.c | 25 | ||||
-rw-r--r-- | source/blender/editors/space_node/node_draw.c | 12 |
2 files changed, 18 insertions, 19 deletions
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index 35c9082b54c..121c597c1bb 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -376,7 +376,7 @@ static void node_draw_frame_label(bNodeTree *ntree, bNode *node, const float asp const int font_size = data->label_size / aspect; const float margin = (float)(NODE_DY / 4); int label_height; - unsigned char color[3]; + uchar color[3]; nodeLabel(ntree, node, label, sizeof(label)); @@ -3483,7 +3483,7 @@ void draw_nodespace_back_pix(const bContext *C, y = (ar->winy - snode->zoom * ibuf->y) / 2 + snode->yof; if (ibuf->rect || ibuf->rect_float) { - unsigned char *display_buffer = NULL; + uchar *display_buffer = NULL; void *cache_handle = NULL; if (snode->flag & (SNODE_SHOW_R | SNODE_SHOW_G | SNODE_SHOW_B | SNODE_SHOW_ALPHA)) { @@ -3707,11 +3707,11 @@ static struct { GPUBatch *batch; /* for batching line together */ GPUBatch *batch_single; /* for single line */ GPUVertBuf *inst_vbo; - unsigned int p0_id, p1_id, p2_id, p3_id; - unsigned int colid_id; + uint p0_id, p1_id, p2_id, p3_id; + uint colid_id; GPUVertBufRaw p0_step, p1_step, p2_step, p3_step; GPUVertBufRaw colid_step; - unsigned int count; + uint count; bool enabled; } g_batch_link = {0}; @@ -3727,11 +3727,11 @@ static void nodelink_batch_reset(void) } static void set_nodelink_vertex(GPUVertBuf *vbo, - unsigned int uv_id, - unsigned int pos_id, - unsigned int exp_id, - unsigned int v, - const unsigned char uv[2], + uint uv_id, + uint pos_id, + uint exp_id, + uint v, + const uchar uv[2], const float pos[2], const float exp[2]) { @@ -3756,7 +3756,7 @@ static void nodelink_batch_init(void) int v = 0; for (int k = 0; k < 2; k++) { - unsigned char uv[2] = {0, 0}; + uchar uv[2] = {0, 0}; float pos[2] = {0.0f, 0.0f}; float exp[2] = {0.0f, 1.0f}; @@ -4000,8 +4000,7 @@ void node_draw_link(View2D *v2d, SpaceNode *snode, bNodeLink *link) // node_draw_link_straight(v2d, snode, link, th_col1, do_shaded, th_col2, do_triple, th_col3); } -void ED_node_draw_snap( - View2D *v2d, const float cent[2], float size, NodeBorder border, unsigned pos) +void ED_node_draw_snap(View2D *v2d, const float cent[2], float size, NodeBorder border, uint pos) { immBegin(GPU_PRIM_LINES, 4); diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c index 2081c69a1a4..6e165df3e2b 100644 --- a/source/blender/editors/space_node/node_draw.c +++ b/source/blender/editors/space_node/node_draw.c @@ -722,18 +722,18 @@ static void node_socket_draw(const bContext *C, bNodeTree *ntree, PointerRNA node_ptr, bNodeSocket *sock, - unsigned pos_id, - unsigned col_id, - unsigned shape_id, - unsigned size_id, - unsigned outline_col_id, + uint pos_id, + uint col_id, + uint shape_id, + uint size_id, + uint outline_col_id, float size, bool selected) { PointerRNA ptr; float color[4]; float outline_color[4]; - unsigned int flags = 0; + uint flags = 0; RNA_pointer_create((ID *)ntree, &RNA_NodeSocket, sock, &ptr); sock->typeinfo->draw_color((bContext *)C, &ptr, &node_ptr, color); |