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:
Diffstat (limited to 'source/blender/blenkernel/intern/curve.cc')
-rw-r--r--source/blender/blenkernel/intern/curve.cc35
1 files changed, 17 insertions, 18 deletions
diff --git a/source/blender/blenkernel/intern/curve.cc b/source/blender/blenkernel/intern/curve.cc
index ca390fae424..652315e74f9 100644
--- a/source/blender/blenkernel/intern/curve.cc
+++ b/source/blender/blenkernel/intern/curve.cc
@@ -395,7 +395,7 @@ void BKE_curve_init(Curve *cu, const short curve_type)
cu->flag |= CU_FRONT | CU_BACK;
cu->vfont = cu->vfontb = cu->vfonti = cu->vfontbi = BKE_vfont_builtin_get();
cu->vfont->id.us += 4;
- cu->str = (char *)MEM_malloc_arrayN(12, sizeof(unsigned char), "str");
+ cu->str = (char *)MEM_malloc_arrayN(12, sizeof(uchar), "str");
BLI_strncpy(cu->str, "Text", 12);
cu->len = cu->len_char32 = cu->pos = 4;
cu->strinfo = (CharInfo *)MEM_calloc_arrayN(12, sizeof(CharInfo), "strinfo new");
@@ -1499,7 +1499,7 @@ void BKE_nurb_makeFaces(const Nurb *nu, float *coord_array, int rowstride, int r
}
u += ustep;
if (rowstride != 0) {
- in = (float *)(((unsigned char *)in) + (rowstride - 3 * totv * sizeof(*in)));
+ in = (float *)(((uchar *)in) + (rowstride - 3 * totv * sizeof(*in)));
}
}
@@ -1647,35 +1647,34 @@ void BKE_nurb_makeCurve(const Nurb *nu,
MEM_freeN(basisu);
}
-unsigned int BKE_curve_calc_coords_axis_len(const unsigned int bezt_array_len,
- const unsigned int resolu,
- const bool is_cyclic,
- const bool use_cyclic_duplicate_endpoint)
+uint BKE_curve_calc_coords_axis_len(const uint bezt_array_len,
+ const uint resolu,
+ const bool is_cyclic,
+ const bool use_cyclic_duplicate_endpoint)
{
- const unsigned int segments = bezt_array_len - (is_cyclic ? 0 : 1);
- const unsigned int points_len = (segments * resolu) +
- (is_cyclic ? (use_cyclic_duplicate_endpoint) : 1);
+ const uint segments = bezt_array_len - (is_cyclic ? 0 : 1);
+ const uint points_len = (segments * resolu) + (is_cyclic ? (use_cyclic_duplicate_endpoint) : 1);
return points_len;
}
void BKE_curve_calc_coords_axis(const BezTriple *bezt_array,
- const unsigned int bezt_array_len,
- const unsigned int resolu,
+ const uint bezt_array_len,
+ const uint resolu,
const bool is_cyclic,
const bool use_cyclic_duplicate_endpoint,
/* array params */
- const unsigned int axis,
- const unsigned int stride,
+ const uint axis,
+ const uint stride,
float *r_points)
{
- const unsigned int points_len = BKE_curve_calc_coords_axis_len(
+ const uint points_len = BKE_curve_calc_coords_axis_len(
bezt_array_len, resolu, is_cyclic, use_cyclic_duplicate_endpoint);
float *r_points_offset = r_points;
- const unsigned int resolu_stride = resolu * stride;
- const unsigned int bezt_array_last = bezt_array_len - 1;
+ const uint resolu_stride = resolu * stride;
+ const uint bezt_array_last = bezt_array_len - 1;
- for (unsigned int i = 0; i < bezt_array_last; i++) {
+ for (uint i = 0; i < bezt_array_last; i++) {
const BezTriple *bezt_curr = &bezt_array[i];
const BezTriple *bezt_next = &bezt_array[i + 1];
BKE_curve_forward_diff_bezier(bezt_curr->vec[1][axis],
@@ -5390,7 +5389,7 @@ bool BKE_curve_material_index_validate(Curve *cu)
return false;
}
-void BKE_curve_material_remap(Curve *cu, const unsigned int *remap, unsigned int remap_len)
+void BKE_curve_material_remap(Curve *cu, const uint *remap, uint remap_len)
{
const int curvetype = BKE_curve_type_get(cu);
const short remap_len_short = (short)remap_len;