Bitflag tests simplification

This commit is contained in:
Dalai Felinto 2017-11-15 13:29:40 -02:00
parent d276e45ee6
commit cb67be3f22
1 changed files with 2 additions and 8 deletions

View File

@ -330,14 +330,8 @@ void do_versions_after_linking_280(Main *main)
/* Add new collection bases. */
for (int layer = 0; layer < 20; layer++) {
if ((
(scene->lay & (1 << layer)) &&
(srl->lay & (1 << layer)) &&
((srl->lay_exclude & (1 << layer)) == 0)) ||
(
(srl->lay_zmask & (1 << layer)) &&
((scene->lay | srl->lay_exclude) & (1 << layer)))
)
if ((scene->lay & srl->lay & ~(srl->lay_exclude) & (1 << layer)) ||
(srl->lay_zmask & (scene->lay | srl->lay_exclude) & (1 << layer)))
{
if (collections[DO_VERSION_COLLECTION_VISIBLE].created & (1 << layer)) {