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/blenkernel/intern/node.cc
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/blenkernel/intern/node.cc')
-rw-r--r--source/blender/blenkernel/intern/node.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/node.cc b/source/blender/blenkernel/intern/node.cc
index 1c7b1b9fa3e..081f30c4329 100644
--- a/source/blender/blenkernel/intern/node.cc
+++ b/source/blender/blenkernel/intern/node.cc
@@ -2716,8 +2716,8 @@ bNodePreview *BKE_node_preview_verify(bNodeInstanceHash *previews,
}
if (preview->rect == nullptr) {
- preview->rect = (unsigned char *)MEM_callocN(4 * xsize + xsize * ysize * sizeof(char[4]),
- "node preview rect");
+ preview->rect = (uchar *)MEM_callocN(4 * xsize + xsize * ysize * sizeof(char[4]),
+ "node preview rect");
preview->xsize = xsize;
preview->ysize = ysize;
}
@@ -2730,7 +2730,7 @@ bNodePreview *BKE_node_preview_copy(bNodePreview *preview)
{
bNodePreview *new_preview = (bNodePreview *)MEM_dupallocN(preview);
if (preview->rect) {
- new_preview->rect = (unsigned char *)MEM_dupallocN(preview->rect);
+ new_preview->rect = (uchar *)MEM_dupallocN(preview->rect);
}
return new_preview;
}
@@ -3899,15 +3899,15 @@ bNodeInstanceKey BKE_node_instance_key(bNodeInstanceKey parent_key,
return key;
}
-static unsigned int node_instance_hash_key(const void *key)
+static uint node_instance_hash_key(const void *key)
{
return ((const bNodeInstanceKey *)key)->value;
}
static bool node_instance_hash_key_cmp(const void *a, const void *b)
{
- unsigned int value_a = ((const bNodeInstanceKey *)a)->value;
- unsigned int value_b = ((const bNodeInstanceKey *)b)->value;
+ uint value_a = ((const bNodeInstanceKey *)a)->value;
+ uint value_b = ((const bNodeInstanceKey *)b)->value;
return (value_a != value_b);
}