diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2017-05-16 17:25:57 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-05-16 17:26:00 +0300 |
commit | 3826e77593e44b441dc4f4162083c4a3ae6fe044 (patch) | |
tree | 8a823aaa52d9cf815d9714cbe50403ba72a02430 /source/blender/draw/modes/object_mode.c | |
parent | b11168c8f15fe320c60ec6b7054f514bd342d738 (diff) |
Draw Manager: Small cleanup on bool and bitwise
We should avoid casting from an int to a flag.
In this case it is probably fine, but if the OB_MODE_SCULPT
was too high it can overflow the bool.
(also adding explicit parenthesis to a flag check)
Diffstat (limited to 'source/blender/draw/modes/object_mode.c')
-rw-r--r-- | source/blender/draw/modes/object_mode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/draw/modes/object_mode.c b/source/blender/draw/modes/object_mode.c index 7fe6ce20608..fce3db61226 100644 --- a/source/blender/draw/modes/object_mode.c +++ b/source/blender/draw/modes/object_mode.c @@ -1192,7 +1192,7 @@ static void OBJECT_cache_populate(void *vedata, Object *ob) if (do_outlines) { Object *obedit = scene->obedit; - if (ob != obedit && !(OBACT_NEW == ob && ob->mode & OB_MODE_ALL_PAINT)) { + if (ob != obedit && !(OBACT_NEW == ob && (ob->mode & OB_MODE_ALL_PAINT))) { struct Batch *geom = DRW_cache_object_surface_get(ob); if (geom) { theme_id = DRW_object_wire_theme_get(ob, sl, NULL); |