Skip to content

Commit bc3df10

Browse files
authored
Minor: changed brace style
2 parents 2058fa7 + d790fc5 commit bc3df10

File tree

1 file changed

+9
-18
lines changed

1 file changed

+9
-18
lines changed

main.cpp

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -62,32 +62,25 @@ static etc1_to_dxt1_56_solution result[32 * 8 * NUM_ETC1_TO_DXT1_SELECTOR_MAPPIN
6262
/**
6363
* Function to optimise.
6464
*/
65-
static void create_etc1_to_dxt1_6_conversion_table()
66-
{
65+
static void create_etc1_to_dxt1_6_conversion_table() {
6766
uint32_t n = 0;
6867

69-
for (int inten = 0; inten < 8; inten++)
70-
{
71-
for (uint32_t g = 0; g < 32; g++)
72-
{
68+
for (int inten = 0; inten < 8; inten++) {
69+
for (uint32_t g = 0; g < 32; g++) {
7370
color32 block_colors[4];
7471
decoder_etc_block::get_diff_subblock_colors(block_colors, decoder_etc_block::pack_color5(color32(g, g, g, 255), false), inten);
7572

76-
for (uint32_t sr = 0; sr < NUM_ETC1_TO_DXT1_SELECTOR_RANGES; sr++)
77-
{
73+
for (uint32_t sr = 0; sr < NUM_ETC1_TO_DXT1_SELECTOR_RANGES; sr++) {
7874
const uint32_t low_selector = g_etc1_to_dxt1_selector_ranges[sr].m_low;
7975
const uint32_t high_selector = g_etc1_to_dxt1_selector_ranges[sr].m_high;
8076

81-
for (uint32_t m = 0; m < NUM_ETC1_TO_DXT1_SELECTOR_MAPPINGS; m++)
82-
{
77+
for (uint32_t m = 0; m < NUM_ETC1_TO_DXT1_SELECTOR_MAPPINGS; m++) {
8378
uint32_t best_lo = 0;
8479
uint32_t best_hi = 0;
8580
uint32_t best_err = UINT32_MAX;
8681

87-
for (uint32_t hi = 0; hi <= 63; hi++)
88-
{
89-
for (uint32_t lo = 0; lo <= 63; lo++)
90-
{
82+
for (uint32_t hi = 0; hi <= 63; hi++) {
83+
for (uint32_t lo = 0; lo <= 63; lo++) {
9184
uint32_t colors[4];
9285

9386
colors[0] = (lo << 2) | (lo >> 4);
@@ -98,15 +91,13 @@ static void create_etc1_to_dxt1_6_conversion_table()
9891

9992
uint32_t total_err = 0;
10093

101-
for (uint32_t s = low_selector; s <= high_selector; s++)
102-
{
94+
for (uint32_t s = low_selector; s <= high_selector; s++) {
10395
int err = block_colors[s].g - colors[g_etc1_to_dxt1_selector_mappings[m][s]];
10496

10597
total_err += err * err;
10698
}
10799

108-
if (total_err < best_err)
109-
{
100+
if (total_err < best_err) {
110101
best_err = total_err;
111102
best_lo = lo;
112103
best_hi = hi;

0 commit comments

Comments
 (0)