forked from bartvdbraak/blender
micro-optimization, avoid checking is_power_of_2_i once in power_of_2_max_i
also whitespace edit.
This commit is contained in:
parent
1ac57ccbc8
commit
260d6cd6b5
@ -131,8 +131,9 @@ MINLINE int power_of_2_max_i(int n)
|
||||
if (is_power_of_2_i(n))
|
||||
return n;
|
||||
|
||||
while (!is_power_of_2_i(n))
|
||||
do {
|
||||
n = n & (n - 1);
|
||||
} while (!is_power_of_2_i(n));
|
||||
|
||||
return n * 2;
|
||||
}
|
||||
|
@ -157,7 +157,7 @@ static bool compare_is_directory(const struct direntry *entry)
|
||||
/* for library browse .blend files may be treated as directories, but
|
||||
* for sorting purposes they should be considered regular files */
|
||||
if (S_ISDIR(entry->type))
|
||||
return !(entry->flags & (BLENDERFILE|BLENDERFILE_BACKUP));
|
||||
return !(entry->flags & (BLENDERFILE | BLENDERFILE_BACKUP));
|
||||
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user