diff options
author | Campbell Barton <campbell@blender.org> | 2022-09-25 10:04:52 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-09-25 11:26:27 +0300 |
commit | 891949cbb47143420f4324cb60efc05ef5d70b39 (patch) | |
tree | fe70a45612ae96f9ce1f37378ef5ff035d3127f5 /source/blender/editors/sculpt_paint | |
parent | c9e35c2ced92082c86f1ecb9ecd16c6230218c7c (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/sculpt_paint')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_image_2d_curve_mask.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image_2d_curve_mask.cc b/source/blender/editors/sculpt_paint/paint_image_2d_curve_mask.cc index f5657b004e2..dc45a7ec51c 100644 --- a/source/blender/editors/sculpt_paint/paint_image_2d_curve_mask.cc +++ b/source/blender/editors/sculpt_paint/paint_image_2d_curve_mask.cc @@ -55,7 +55,7 @@ static void update_curve_mask(CurveMaskCache *curve_mask_cache, int offset = (int)floorf(diameter / 2.0f); int clamped_radius = max_ff(radius, 1.0); - unsigned short *m = curve_mask_cache->curve_mask; + ushort *m = curve_mask_cache->curve_mask; const int aa_samples = aa_samples_per_texel_axis(brush, radius); const float aa_offset = 1.0f / (2.0f * (float)aa_samples); @@ -87,7 +87,7 @@ static void update_curve_mask(CurveMaskCache *curve_mask_cache, } pixel_xy[0] += aa_step; } - *m = (unsigned short)(total_weight * weight_factor); + *m = (ushort)(total_weight * weight_factor); } } } @@ -140,8 +140,7 @@ static void curve_mask_free(CurveMaskCache *curve_mask_cache) static void curve_mask_allocate(CurveMaskCache *curve_mask_cache, const int diameter) { const size_t curve_mask_size = diameter_to_curve_mask_size(diameter); - curve_mask_cache->curve_mask = static_cast<unsigned short *>( - MEM_mallocN(curve_mask_size, __func__)); + curve_mask_cache->curve_mask = static_cast<ushort *>(MEM_mallocN(curve_mask_size, __func__)); curve_mask_cache->curve_mask_size = curve_mask_size; } |