mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-24 00:31:34 +11:00
Don't try to check the same colour repeatedly
This commit is contained in:
parent
b5e01fc2dc
commit
beff079880
|
@ -141,6 +141,10 @@ impl Palette16Optimiser {
|
||||||
}
|
}
|
||||||
|
|
||||||
for colour in ¤t_palette.colours {
|
for colour in ¤t_palette.colours {
|
||||||
|
if palette.colours.contains(&colour) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if let Some(colour_index) = self.colours.iter().position(|c| c == colour) {
|
if let Some(colour_index) = self.colours.iter().position(|c| c == colour) {
|
||||||
colour_usage[colour_index] += 1;
|
colour_usage[colour_index] += 1;
|
||||||
a_colour_is_used = true;
|
a_colour_is_used = true;
|
||||||
|
|
Loading…
Reference in a new issue