Skip to content

Commit 98f2e4d

Browse files
committed
doesnt need to be explicit
1 parent 99f0d73 commit 98f2e4d

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/courtroom.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3525,9 +3525,8 @@ static std::optional<PauseInfo> parse_pause_duration(const QString &text, int st
35253525
return PauseInfo{1000, 0};
35263526
}
35273527

3528-
bool ok;
3529-
int value = qMin(10000, text.mid(start_pos, pos - start_pos).toInt(&ok));
3530-
return ok ? std::optional<PauseInfo>{PauseInfo{value, pos - start_pos}} : std::nullopt;
3528+
int value = qMin(10000, text.mid(start_pos, pos - start_pos).toInt());
3529+
return std::optional<PauseInfo>{PauseInfo{value, pos - start_pos}};
35313530
}
35323531

35333532
QString Courtroom::filter_ic_text(QString p_text, bool html, int target_pos, int default_color)

0 commit comments

Comments
 (0)