Skip to content

Commit 0fb32c9

Browse files
committed
fix cast
1 parent 2796000 commit 0fb32c9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

cpp/src/streaming/core/memory_reserve_or_wait.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,8 @@ coro::task<void> MemoryReserveOrWait::periodic_memory_check() {
147147

148148
// Helper that returns available memory, clamped so negative values become zero.
149149
auto memory_available = [f = br->memory_available(mem_type_)]() -> std::size_t {
150-
auto const ret = f();
151-
return static_cast<std::size_t>(std::max(ret, 0));
150+
std::int64_t const ret = f();
151+
return static_cast<std::size_t>(std::max(ret, std::int64_t{0}));
152152
};
153153

154154
// Helper that returns the subrange of reservation requests with size <= max_size.

0 commit comments

Comments
 (0)