Skip to content

Commit

Permalink
One more
Browse files Browse the repository at this point in the history
  • Loading branch information
LinZhihao-723 committed Nov 29, 2023
1 parent 87d52a8 commit b449a5b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/clp_ffi_py/ir/native/PyDecoderBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ auto PyDecoderBuffer::init(PyObject* input_stream, Py_ssize_t buf_capacity) -> b
PyErr_NoMemory();
return false;
}
m_read_buffer = std::span<int8_t>(m_read_buffer_mem_owner, buf_capacity);
m_read_buffer = std::span<int8_t>{m_read_buffer_mem_owner, static_cast<size_t>(buf_capacity)};
m_input_ir_stream = input_stream;
Py_INCREF(m_input_ir_stream);
return true;
Expand All @@ -242,7 +242,7 @@ auto PyDecoderBuffer::populate_read_buffer(Py_ssize_t& num_bytes_read) -> bool {
PyErr_NoMemory();
return false;
}
std::span<int8_t> new_read_buffer{new_buf, static_cast<size_t>(new_capacity)};
std::span<int8_t> const new_read_buffer{new_buf, static_cast<size_t>(new_capacity)};
std::copy(
unconsumed_bytes_in_curr_read_buffer.begin(),
unconsumed_bytes_in_curr_read_buffer.end(),
Expand Down

0 comments on commit b449a5b

Please sign in to comment.