Skip to content

Commit

Permalink
reactor: next_waitpid_timeout: contants can be defined as constexpr
Browse files Browse the repository at this point in the history
No need to define them as static variables.

Signed-off-by: Benny Halevy <bhalevy@scylladb.com>
  • Loading branch information
bhalevy committed Nov 10, 2024
1 parent 568044c commit b0e2e4f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/reactor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2057,8 +2057,8 @@ reactor::spawn(std::string_view pathname,
}

static auto next_waitpid_timeout(std::chrono::milliseconds this_timeout) {
static const std::chrono::milliseconds step_timeout(20);
static const std::chrono::milliseconds max_timeout(1000);
constexpr std::chrono::milliseconds step_timeout(20);
constexpr std::chrono::milliseconds max_timeout(1000);
if (this_timeout >= max_timeout) {
return max_timeout;
}
Expand Down

0 comments on commit b0e2e4f

Please sign in to comment.