1
0
Fork 0

Merge pull request #7457 from staabm/patch-2

Remove unnecessary abs() calls
pull/7432/merge
Rob 2018-07-12 09:58:38 +02:00 committed by GitHub
commit b350c09c7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -100,7 +100,7 @@ class Solver
$literals = $rule->getLiterals();
$literal = $literals[0];
if (!$this->decisions->decided(abs($literal))) {
if (!$this->decisions->decided($literal)) {
$this->decisions->decide($literal, 1, $rule);
continue;
}
@ -792,14 +792,14 @@ class Solver
//
foreach ($literals as $literal) {
if ($literal <= 0) {
if (!$this->decisions->decidedInstall(abs($literal))) {
if (!$this->decisions->decidedInstall($literal)) {
continue 2; // next rule
}
} else {
if ($this->decisions->decidedInstall(abs($literal))) {
if ($this->decisions->decidedInstall($literal)) {
continue 2; // next rule
}
if ($this->decisions->undecided(abs($literal))) {
if ($this->decisions->undecided($literal)) {
$decisionQueue[] = $literal;
}
}