Skip to content

Commit

Permalink
perf: remove useless double checks in PeriodPeriodMax (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
jy95 authored Feb 1, 2025
1 parent e100ca5 commit 2164cbb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public boolean hasPeriodMax(Dosage dosage) {
@Override
public boolean hasRequiredElements(Dosage dosage) {
var timing = dosage.getTiming();
return timing.hasRepeat() && timing.hasRepeat() && (hasPeriod(dosage) || hasPeriodMax(dosage));
return timing.hasRepeat() && (hasPeriod(dosage) || hasPeriodMax(dosage));
}

/** {@inheritDoc} */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public boolean hasPeriodMax(Dosage dosage) {
@Override
public boolean hasRequiredElements(Dosage dosage) {
var timing = dosage.getTiming();
return timing.hasRepeat() && timing.hasRepeat() && (hasPeriod(dosage) || hasPeriodMax(dosage));
return timing.hasRepeat() && (hasPeriod(dosage) || hasPeriodMax(dosage));
}

/** {@inheritDoc} */
Expand Down

0 comments on commit 2164cbb

Please sign in to comment.