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/ikplugin | |
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/ikplugin')
-rw-r--r-- | source/blender/ikplugin/intern/itasc_plugin.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/ikplugin/intern/itasc_plugin.cpp b/source/blender/ikplugin/intern/itasc_plugin.cpp index b9f7dd98073..8e3d4e7686f 100644 --- a/source/blender/ikplugin/intern/itasc_plugin.cpp +++ b/source/blender/ikplugin/intern/itasc_plugin.cpp @@ -60,7 +60,7 @@ using Vector3 = float[3]; using Vector4 = float[4]; struct IK_Target; using ErrorCallback = void (*)(const iTaSC::ConstraintValues *values, - unsigned int nvalues, + uint nvalues, IK_Target *iktarget); /* one structure for each target in the scene */ @@ -75,7 +75,7 @@ struct IK_Target { ErrorCallback errorCallback; std::string targetName; std::string constraintName; - unsigned short controlType; + ushort controlType; short channel; /* index in IK channel array of channel on which this target is defined */ short ee; /* end effector number */ bool simulation; /* true when simulation mode is used (update feedback) */ @@ -704,7 +704,7 @@ static bool base_callback(const iTaSC::Timestamp ×tamp, static bool copypose_callback(const iTaSC::Timestamp ×tamp, iTaSC::ConstraintValues *const _values, - unsigned int _nvalues, + uint _nvalues, void *_param) { IK_Target *iktarget = (IK_Target *)_param; @@ -749,7 +749,7 @@ static bool copypose_callback(const iTaSC::Timestamp ×tamp, } static void copypose_error(const iTaSC::ConstraintValues *values, - unsigned int nvalues, + uint nvalues, IK_Target *iktarget) { iTaSC::ConstraintSingleValue *value; @@ -776,7 +776,7 @@ static void copypose_error(const iTaSC::ConstraintValues *values, static bool distance_callback(const iTaSC::Timestamp ×tamp, iTaSC::ConstraintValues *const _values, - unsigned int _nvalues, + uint _nvalues, void *_param) { IK_Target *iktarget = (IK_Target *)_param; @@ -826,7 +826,7 @@ static bool distance_callback(const iTaSC::Timestamp ×tamp, } static void distance_error(const iTaSC::ConstraintValues *values, - unsigned int _nvalues, + uint _nvalues, IK_Target *iktarget) { iktarget->blenderConstraint->lin_error = (float)(values->values[0].y - values->values[0].yd); @@ -834,7 +834,7 @@ static void distance_error(const iTaSC::ConstraintValues *values, static bool joint_callback(const iTaSC::Timestamp ×tamp, iTaSC::ConstraintValues *const _values, - unsigned int _nvalues, + uint _nvalues, void *_param) { IK_Channel *ikchan = (IK_Channel *)_param; @@ -909,7 +909,7 @@ static bool joint_callback(const iTaSC::Timestamp ×tamp, break; } if (dof >= 0) { - for (unsigned int i = 0; i < _nvalues; i++, dof++) { + for (uint i = 0; i < _nvalues; i++, dof++) { _values[i].values[0].yd = ikchan->jointValue[dof]; _values[i].alpha = chan->ikrotweight; _values[i].feedback = ikparam->feedback; @@ -1139,7 +1139,7 @@ static IK_Scene *convert_tree( KDL::Frame initPose; Bone *bone; int a, numtarget; - unsigned int t; + uint t; float length; bool ret = true; double *rot; @@ -1512,7 +1512,7 @@ static IK_Scene *convert_tree( iktarget->bldepsgraph = depsgraph; condata = (bKinematicConstraint *)iktarget->blenderConstraint->data; pchan = tree->pchan[iktarget->channel]; - unsigned int controltype, bone_count; + uint controltype, bone_count; double bone_length; float mat[4][4]; |