Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-09-25 10:04:52 +0300
committerCampbell Barton <campbell@blender.org>2022-09-25 11:26:27 +0300
commit891949cbb47143420f4324cb60efc05ef5d70b39 (patch)
treefe70a45612ae96f9ce1f37378ef5ff035d3127f5 /source/blender/editors/gpencil
parentc9e35c2ced92082c86f1ecb9ecd16c6230218c7c (diff)
Cleanup: use 'u' prefixed integer types for brevity & cast style
To use function style cast '(unsigned char)x' can't be replaced by 'unsigned char(x)'.
Diffstat (limited to 'source/blender/editors/gpencil')
-rw-r--r--source/blender/editors/gpencil/gpencil_select.c4
-rw-r--r--source/blender/editors/gpencil/gpencil_trace_utils.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/gpencil/gpencil_select.c b/source/blender/editors/gpencil/gpencil_select.c
index 95f43733a36..5c3724e6ea4 100644
--- a/source/blender/editors/gpencil/gpencil_select.c
+++ b/source/blender/editors/gpencil/gpencil_select.c
@@ -576,7 +576,7 @@ static int gpencil_select_random_exec(bContext *C, wmOperator *op)
if (selectmode == GP_SELECTMODE_STROKE) {
RNG *rng = BLI_rng_new(seed_iter);
- const unsigned int j = BLI_rng_get_uint(rng) % gps->totpoints;
+ const uint j = BLI_rng_get_uint(rng) % gps->totpoints;
bool select_stroke = ((gps->totpoints * randfac) <= j) ? true : false;
select_stroke ^= select;
/* Curve function has select parameter inverted. */
@@ -647,7 +647,7 @@ static int gpencil_select_random_exec(bContext *C, wmOperator *op)
if (selectmode == GP_SELECTMODE_STROKE) {
RNG *rng = BLI_rng_new(seed_iter);
- const unsigned int j = BLI_rng_get_uint(rng) % gps->totpoints;
+ const uint j = BLI_rng_get_uint(rng) % gps->totpoints;
bool select_stroke = ((gps->totpoints * randfac) <= j) ? true : false;
select_stroke ^= select;
select_all_stroke_points(gpd, gps, select_stroke);
diff --git a/source/blender/editors/gpencil/gpencil_trace_utils.c b/source/blender/editors/gpencil/gpencil_trace_utils.c
index 735759d40ec..aa9a2a653bb 100644
--- a/source/blender/editors/gpencil/gpencil_trace_utils.c
+++ b/source/blender/editors/gpencil/gpencil_trace_utils.c
@@ -119,7 +119,7 @@ static void pixel_at_index(const ImBuf *ibuf, const int32_t idx, float r_col[4])
copy_v4_v4(r_col, frgba);
}
else {
- unsigned char *cp = (unsigned char *)(ibuf->rect + idx);
+ uchar *cp = (uchar *)(ibuf->rect + idx);
r_col[0] = (float)cp[0] / 255.0f;
r_col[1] = (float)cp[1] / 255.0f;
r_col[2] = (float)cp[2] / 255.0f;