Skip to content

Commit

Permalink
Merge 1ef0c70 into 70713cc
Browse files Browse the repository at this point in the history
  • Loading branch information
dorooleg authored May 18, 2024
2 parents 70713cc + 1ef0c70 commit 77e87d8
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ bool IsOverflow(ui64 a, ui64 b) {
return b > diff;
}

bool IsOverflow(ui64 a, i64 b) {
bool IsOverflowUi64I64(ui64 a, i64 b) {
return b > 0 ? IsOverflow(a, (ui64)b) : a < (ui64)-b;
}

Expand Down Expand Up @@ -213,7 +213,7 @@ TInstant AddUnit(TInstant current, int64_t interval, IPathGenerator::EIntervalUn
}

const i64 deltaValue = (interval > 0 ? 1LL : -1LL) * delta.GetValue();
if (IsOverflow(current.GetValue(), deltaValue)) {
if (IsOverflowUi64I64(current.GetValue(), deltaValue)) {
ythrow yexception() << "Timestamp is overflowed";
}

Expand Down

0 comments on commit 77e87d8

Please sign in to comment.