style cleanup: also some typos

This commit is contained in:
2013-02-11 00:49:00 +00:00
parent 22dbb675c1
commit 2005f7c6c0
23 changed files with 56 additions and 53 deletions

View File

@@ -938,17 +938,18 @@ static void build_permutation_table(unsigned short permutation[], unsigned short
permutation[i] = temp_permutation[entry];
/* delete entry */
for(k = entry; k < nr_entries_left - 1; k++)
for (k = entry; k < nr_entries_left - 1; k++) {
temp_permutation[k] = temp_permutation[k + 1];
}
}
/* verify permutation table
* every entry must appear exactly once
*/
#if 0
for(i = 0; i < number_of_rays; i++) temp_permutation[i] = 0;
for(i = 0; i < number_of_rays; i++) ++temp_permutation[permutation[i]];
for(i = 0; i < number_of_rays; i++) BLI_assert(temp_permutation[i] == 1);
for (i = 0; i < number_of_rays; i++) temp_permutation[i] = 0;
for (i = 0; i < number_of_rays; i++) ++temp_permutation[permutation[i]];
for (i = 0; i < number_of_rays; i++) BLI_assert(temp_permutation[i] == 1);
#endif
}