Don't apply alpha optimizations unless --alpha is paseed (#187)

Closes #164
This commit is contained in:
Kamal Ahmad 2019-09-24 20:33:50 +05:00 committed by Josh Holmer
parent e473958377
commit 68db304a2a
2 changed files with 3 additions and 7 deletions

View file

@ -250,11 +250,6 @@ impl Options {
}
fn apply_preset_4(mut self) -> Self {
self.alphas.insert(AlphaOptim::White);
self.alphas.insert(AlphaOptim::Up);
self.alphas.insert(AlphaOptim::Down);
self.alphas.insert(AlphaOptim::Left);
self.alphas.insert(AlphaOptim::Right);
self.apply_preset_3()
}
@ -285,9 +280,9 @@ impl Default for Options {
for i in 0..4 {
strategies.insert(i);
}
// We always need NoOp to be present
let mut alphas = HashSet::new();
alphas.insert(colors::AlphaOptim::NoOp);
alphas.insert(colors::AlphaOptim::Black);
alphas.insert(AlphaOptim::NoOp);
Options {
backup: false,

View file

@ -363,6 +363,7 @@ fn parse_opts_into_struct(
};
if matches.is_present("alpha") {
opts.alphas.insert(AlphaOptim::Black);
opts.alphas.insert(AlphaOptim::White);
opts.alphas.insert(AlphaOptim::Up);
opts.alphas.insert(AlphaOptim::Down);