Commit: 54f0f87a4b715deeece0ceb6f78ab325ba598e35
Author: Campbell Barton
Date:   Sun Jun 18 01:34:41 2017 +1000
Branches: blender2.8
https://developer.blender.org/rB54f0f87a4b715deeece0ceb6f78ab325ba598e35

Cleanup: use uint

===================================================================

M       source/blender/editors/manipulator_library/arrow2d_manipulator.c
M       source/blender/editors/manipulator_library/arrow3d_manipulator.c
M       source/blender/editors/manipulator_library/cage2d_manipulator.c
M       source/blender/editors/manipulator_library/dial3d_manipulator.c
M       source/blender/editors/manipulator_library/grab3d_manipulator.c
M       source/blender/editors/manipulator_library/manipulator_draw_utils.c
M       source/blender/editors/manipulator_library/manipulator_library_intern.h
M       source/blender/editors/manipulator_library/primitive3d_manipulator.c
M       source/blender/editors/transform/transform_manipulator.c

===================================================================

diff --git a/source/blender/editors/manipulator_library/arrow2d_manipulator.c 
b/source/blender/editors/manipulator_library/arrow2d_manipulator.c
index f7d4926c7ca..159fcd658ec 100644
--- a/source/blender/editors/manipulator_library/arrow2d_manipulator.c
+++ b/source/blender/editors/manipulator_library/arrow2d_manipulator.c
@@ -75,7 +75,7 @@ static void arrow2d_draw_geom(ArrowManipulator2D *arrow, 
const float origin[2],
        const float len = arrow->line_len;
        const float draw_line_ofs = (arrow->manipulator.line_width * 0.5f) / 
arrow->manipulator.scale;
 
-       unsigned int pos = VertexFormat_add_attrib(immVertexFormat(), "pos", 
COMP_F32, 2, KEEP_FLOAT);
+       uint pos = VertexFormat_add_attrib(immVertexFormat(), "pos", COMP_F32, 
2, KEEP_FLOAT);
 
        gpuPushMatrix();
        gpuTranslate2fv(origin);
diff --git a/source/blender/editors/manipulator_library/arrow3d_manipulator.c 
b/source/blender/editors/manipulator_library/arrow3d_manipulator.c
index 9e38945628f..f0f7470c058 100644
--- a/source/blender/editors/manipulator_library/arrow3d_manipulator.c
+++ b/source/blender/editors/manipulator_library/arrow3d_manipulator.c
@@ -99,7 +99,7 @@ static void manipulator_arrow_position_get(wmManipulator 
*mpr, float r_pos[3])
 
 static void arrow_draw_geom(const ArrowManipulator3D *arrow, const bool 
select, const float color[4])
 {
-       unsigned int pos = VertexFormat_add_attrib(immVertexFormat(), "pos", 
COMP_F32, 3, KEEP_FLOAT);
+       uint pos = VertexFormat_add_attrib(immVertexFormat(), "pos", COMP_F32, 
3, KEEP_FLOAT);
        bool unbind_shader = true;
 
        immBindBuiltinProgram(GPU_SHADER_3D_UNIFORM_COLOR);
diff --git a/source/blender/editors/manipulator_library/cage2d_manipulator.c 
b/source/blender/editors/manipulator_library/cage2d_manipulator.c
index 5030d68bbab..9236a5ef10e 100644
--- a/source/blender/editors/manipulator_library/cage2d_manipulator.c
+++ b/source/blender/editors/manipulator_library/cage2d_manipulator.c
@@ -86,7 +86,7 @@ typedef struct Cage2D {
 static void rect_transform_draw_corners(
         const rctf *r, const float offsetx, const float offsety, const float 
color[3])
 {
-       unsigned int pos = VertexFormat_add_attrib(immVertexFormat(), "pos", 
COMP_F32, 2, KEEP_FLOAT);
+       uint pos = VertexFormat_add_attrib(immVertexFormat(), "pos", COMP_F32, 
2, KEEP_FLOAT);
 
        immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
        immUniformColor3fv(color);
@@ -176,8 +176,8 @@ static void rect_transform_draw_interaction(
        }
 
        VertexFormat *format = immVertexFormat();
-       unsigned int pos = VertexFormat_add_attrib(format, "pos", COMP_F32, 2, 
KEEP_FLOAT);
-       unsigned int color = VertexFormat_add_attrib(format, "color", COMP_F32, 
3, KEEP_FLOAT);
+       uint pos = VertexFormat_add_attrib(format, "pos", COMP_F32, 2, 
KEEP_FLOAT);
+       uint color = VertexFormat_add_attrib(format, "color", COMP_F32, 3, 
KEEP_FLOAT);
        immBindBuiltinProgram(GPU_SHADER_2D_FLAT_COLOR);
 
        glLineWidth(line_width + 3.0);
diff --git a/source/blender/editors/manipulator_library/dial3d_manipulator.c 
b/source/blender/editors/manipulator_library/dial3d_manipulator.c
index 283732c862f..926bf1f2bdc 100644
--- a/source/blender/editors/manipulator_library/dial3d_manipulator.c
+++ b/source/blender/editors/manipulator_library/dial3d_manipulator.c
@@ -129,7 +129,7 @@ static void dial_geom_draw(
        glLineWidth(dial->manipulator.line_width);
 
        VertexFormat *format = immVertexFormat();
-       unsigned int pos = VertexFormat_add_attrib(format, "pos", COMP_F32, 2, 
KEEP_FLOAT);
+       uint pos = VertexFormat_add_attrib(format, "pos", COMP_F32, 2, 
KEEP_FLOAT);
 
        if (clip_plane) {
                immBindBuiltinProgram(GPU_SHADER_3D_CLIPPED_UNIFORM_COLOR);
@@ -166,7 +166,7 @@ static void dial_ghostarc_draw_helpline(const float angle, 
const float co_outer[
        gpuPushMatrix();
        gpuRotate3f(RAD2DEGF(angle), 0.0f, 0.0f, -1.0f);
 
-       unsigned int pos = VertexFormat_add_attrib(immVertexFormat(), "pos", 
COMP_F32, 3, KEEP_FLOAT);
+       uint pos = VertexFormat_add_attrib(immVertexFormat(), "pos", COMP_F32, 
3, KEEP_FLOAT);
 
        immBindBuiltinProgram(GPU_SHADER_3D_UNIFORM_COLOR);
 
@@ -188,7 +188,7 @@ static void dial_ghostarc_draw(
        const float width_inner = DIAL_WIDTH - dial->manipulator.line_width * 
0.5f / U.manipulator_scale;
 
        VertexFormat *format = immVertexFormat();
-       unsigned int pos = VertexFormat_add_attrib(format, "pos", COMP_F32, 2, 
KEEP_FLOAT);
+       uint pos = VertexFormat_add_attrib(format, "pos", COMP_F32, 2, 
KEEP_FLOAT);
        immBindBuiltinProgram(GPU_SHADER_3D_UNIFORM_COLOR);
        immUniformColor4fv(color);
        imm_draw_disk_partial_fill(
diff --git a/source/blender/editors/manipulator_library/grab3d_manipulator.c 
b/source/blender/editors/manipulator_library/grab3d_manipulator.c
index 7d1fec5e345..136613e22c2 100644
--- a/source/blender/editors/manipulator_library/grab3d_manipulator.c
+++ b/source/blender/editors/manipulator_library/grab3d_manipulator.c
@@ -105,7 +105,7 @@ static void grab_geom_draw(
        glLineWidth(grab3d->manipulator.line_width);
 
        VertexFormat *format = immVertexFormat();
-       unsigned int pos = VertexFormat_add_attrib(format, "pos", COMP_F32, 2, 
KEEP_FLOAT);
+       uint pos = VertexFormat_add_attrib(format, "pos", COMP_F32, 2, 
KEEP_FLOAT);
 
        immBindBuiltinProgram(GPU_SHADER_3D_UNIFORM_COLOR);
 
diff --git 
a/source/blender/editors/manipulator_library/manipulator_draw_utils.c 
b/source/blender/editors/manipulator_library/manipulator_draw_utils.c
index 239d7d68d09..d9434be8e0a 100644
--- a/source/blender/editors/manipulator_library/manipulator_draw_utils.c
+++ b/source/blender/editors/manipulator_library/manipulator_draw_utils.c
@@ -70,8 +70,8 @@ void wm_manipulator_geometryinfo_draw(const 
ManipulatorGeomInfo *info, const boo
        ElementListBuilder elb = {0};
 
        VertexFormat format = {0};
-       unsigned int pos_id = VertexFormat_add_attrib(&format, "pos", COMP_F32, 
3, KEEP_FLOAT);
-       unsigned int nor_id;
+       uint pos_id = VertexFormat_add_attrib(&format, "pos", COMP_F32, 3, 
KEEP_FLOAT);
+       uint nor_id;
 
        if (use_lighting) {
                nor_id = VertexFormat_add_attrib(&format, "nor", COMP_I16, 3, 
NORMALIZE_INT_TO_FLOAT);
@@ -113,8 +113,8 @@ void wm_manipulator_geometryinfo_draw(const 
ManipulatorGeomInfo *info, const boo
 }
 
 void wm_manipulator_vec_draw(
-        const float color[4], const float (*verts)[3], unsigned int vert_count,
-        unsigned int pos, unsigned int primitive_type)
+        const float color[4], const float (*verts)[3], uint vert_count,
+        uint pos, uint primitive_type)
 {
        immUniformColor4fv(color);
        immBegin(primitive_type, vert_count);
diff --git 
a/source/blender/editors/manipulator_library/manipulator_library_intern.h 
b/source/blender/editors/manipulator_library/manipulator_library_intern.h
index c21a3046be5..ec04349ec33 100644
--- a/source/blender/editors/manipulator_library/manipulator_library_intern.h
+++ b/source/blender/editors/manipulator_library/manipulator_library_intern.h
@@ -97,8 +97,8 @@ void manipulator_color_get(
 
 void wm_manipulator_geometryinfo_draw(const struct ManipulatorGeomInfo *info, 
const bool select, const float color[4]);
 void wm_manipulator_vec_draw(
-        const float color[4], const float (*verts)[3], unsigned int vert_count,
-        unsigned int pos, unsigned int primitive_type);
+        const float color[4], const float (*verts)[3], uint vert_count,
+        uint pos, uint primitive_type);
 
 
 #endif  /* __MANIPULATOR_LIBRARY_INTERN_H__ */
diff --git 
a/source/blender/editors/manipulator_library/primitive3d_manipulator.c 
b/source/blender/editors/manipulator_library/primitive3d_manipulator.c
index 03e8da0e8d4..743927c4147 100644
--- a/source/blender/editors/manipulator_library/primitive3d_manipulator.c
+++ b/source/blender/editors/manipulator_library/primitive3d_manipulator.c
@@ -81,7 +81,7 @@ static void manipulator_primitive_draw_geom(
         const float col_inner[4], const float col_outer[4], const int style)
 {
        float (*verts)[3];
-       unsigned int vert_count = 0;
+       uint vert_count = 0;
 
        if (style == ED_MANIPULATOR_PRIMITIVE_STYLE_PLANE) {
                verts = verts_plane;
@@ -89,7 +89,7 @@ static void manipulator_primitive_draw_geom(
        }
 
        if (vert_count > 0) {
-               unsigned int pos = VertexFormat_add_attrib(immVertexFormat(), 
"pos", COMP_F32, 3, KEEP_FLOAT);
+               uint pos = VertexFormat_add_attrib(immVertexFormat(), "pos", 
COMP_F32, 3, KEEP_FLOAT);
                immBindBuiltinProgram(GPU_SHADER_3D_UNIFORM_COLOR);
                wm_manipulator_vec_draw(col_inner, verts, vert_count, pos, 
PRIM_TRIANGLE_FAN);
                wm_manipulator_vec_draw(col_outer, verts, vert_count, pos, 
PRIM_LINE_LOOP);
diff --git a/source/blender/editors/transform/transform_manipulator.c 
b/source/blender/editors/transform/transform_manipulator.c
index 13053e3290d..748cfc288c0 100644
--- a/source/blender/editors/transform/transform_manipulator.c
+++ b/source/blender/editors/transform/transform_manipulator.c
@@ -250,7 +250,7 @@ static short manipulator_get_axis_type(const 
ManipulatorGroup *man, const wmMani
 }
 
 /* get index within axis type, so that x == 0, y == 1 and z == 2, no matter 
which axis type */
-static unsigned int manipulator_index_normalize(const int axis_idx)
+static uint manipulator_index_normalize(const int axis_idx)
 {
        if (axis_idx > MAN_AXIS_TRANS_ZX) {
                return axis_idx - 16;
@@ -272,7 +272,7 @@ static bool manipulator_is_axis_visible(
         const View3D *v3d, const RegionView3D *rv3d,
         const float idot[3], const int axis_type, const int axis_idx)
 {
-       const unsigned int aidx_norm = manipulator_index_normalize(axis_idx);
+       const uint aidx_norm = manipulator_index_normalize(axis_idx);
        /* don't draw axis perpendicular to the view */
        if (aidx_norm < 3 && idot[aidx_norm] < TW_AXIS_DOT_MIN) {
                return false;

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to