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-06-03 17:21:57 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-06-03 17:24:38 +0300
commit1f650c402d3b43eee7cb51c7d4f373ba82ac2116 (patch)
treeba2432fe9424ae545d3758d37ec8ebb0419a2ba5 /source/blender/makesrna/intern/rna_palette.c
parente3f2034e7b925bc7e31e65051842cf26d70a20bc (diff)
Cleanup: style, use braces in RNA
Diffstat (limited to 'source/blender/makesrna/intern/rna_palette.c')
-rw-r--r--source/blender/makesrna/intern/rna_palette.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_palette.c b/source/blender/makesrna/intern/rna_palette.c
index 9af6387389c..42bfe1a13b7 100644
--- a/source/blender/makesrna/intern/rna_palette.c
+++ b/source/blender/makesrna/intern/rna_palette.c
@@ -68,8 +68,9 @@ static PointerRNA rna_Palette_active_color_get(PointerRNA *ptr)
color = BLI_findlink(&palette->colors, palette->active_color);
- if (color)
+ if (color) {
return rna_pointer_inherit_refine(ptr, &RNA_PaletteColor, color);
+ }
return rna_pointer_inherit_refine(ptr, NULL, NULL);
}
@@ -82,10 +83,12 @@ static void rna_Palette_active_color_set(PointerRNA *ptr,
PaletteColor *color = value.data;
/* -1 is ok for an unset index */
- if (color == NULL)
+ if (color == NULL) {
palette->active_color = -1;
- else
+ }
+ else {
palette->active_color = BLI_findindex(&palette->colors, color);
+ }
}
#else