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 <ideasman42@gmail.com>2019-08-05 21:20:17 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-08-05 21:35:22 +0300
commitb4a325f535e56e37f1a22c12f189b39552fd6ba7 (patch)
tree8cf0375dbd598546b7cee0891e578682bfd27646 /source/blender/blenloader
parent17f299c5d14f0435595afe51c4153ae4037bb81b (diff)
Cleanup: use unsigned char for theme colors
Nearly all byte-color functions use 'uchar' causing casts when then colors were passed in. Declare as uchar to remove the need for casts.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c4
-rw-r--r--source/blender/blenloader/intern/versioning_userdef.c12
2 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 44bb07d87f8..516cead37c1 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -9395,8 +9395,8 @@ static void do_versions_userdef(FileData *fd, BlendFileData *bfd)
/* Themes for Node and Sequence editor were not using grid color,
* but back. we copy this over then. */
for (btheme = user->themes.first; btheme; btheme = btheme->next) {
- copy_v4_v4_char(btheme->space_node.grid, btheme->space_node.back);
- copy_v4_v4_char(btheme->space_sequencer.grid, btheme->space_sequencer.back);
+ copy_v4_v4_uchar(btheme->space_node.grid, btheme->space_node.back);
+ copy_v4_v4_uchar(btheme->space_sequencer.grid, btheme->space_sequencer.back);
}
}
diff --git a/source/blender/blenloader/intern/versioning_userdef.c b/source/blender/blenloader/intern/versioning_userdef.c
index e42a9bc9f95..e987a623d0b 100644
--- a/source/blender/blenloader/intern/versioning_userdef.c
+++ b/source/blender/blenloader/intern/versioning_userdef.c
@@ -51,12 +51,12 @@ static void do_versions_theme(const UserDef *userdef, bTheme *btheme)
memcpy(btheme, &U_theme_default, sizeof(*btheme));
}
-#define FROM_DEFAULT_V4_UCHAR(member) copy_v4_v4_char(btheme->member, U_theme_default.member)
+#define FROM_DEFAULT_V4_UCHAR(member) copy_v4_v4_uchar(btheme->member, U_theme_default.member)
if (!USER_VERSION_ATLEAST(280, 25)) {
- copy_v4_v4_char(btheme->space_action.anim_preview_range, btheme->space_action.anim_active);
- copy_v4_v4_char(btheme->space_nla.anim_preview_range, btheme->space_nla.anim_active);
- copy_v4_v4_char(btheme->space_graph.anim_preview_range, btheme->space_action.anim_active);
+ copy_v4_v4_uchar(btheme->space_action.anim_preview_range, btheme->space_action.anim_active);
+ copy_v4_v4_uchar(btheme->space_nla.anim_preview_range, btheme->space_nla.anim_active);
+ copy_v4_v4_uchar(btheme->space_graph.anim_preview_range, btheme->space_action.anim_active);
}
if (!USER_VERSION_ATLEAST(280, 26)) {
@@ -102,8 +102,8 @@ static void do_versions_theme(const UserDef *userdef, bTheme *btheme)
if (!USER_VERSION_ATLEAST(280, 40)) {
FROM_DEFAULT_V4_UCHAR(space_preferences.navigation_bar);
- copy_v4_v4_char(btheme->space_preferences.execution_buts,
- btheme->space_preferences.navigation_bar);
+ copy_v4_v4_uchar(btheme->space_preferences.execution_buts,
+ btheme->space_preferences.navigation_bar);
}
if (!USER_VERSION_ATLEAST(280, 41)) {