From b449a5bd4488ca7607d00368a16e8cc0290cba5e Mon Sep 17 00:00:00 2001 From: LinZhihao-723 Date: Wed, 29 Nov 2023 14:17:03 -0500 Subject: [PATCH] One more --- src/clp_ffi_py/ir/native/PyDecoderBuffer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/clp_ffi_py/ir/native/PyDecoderBuffer.cpp b/src/clp_ffi_py/ir/native/PyDecoderBuffer.cpp index 6116913b..6741d820 100644 --- a/src/clp_ffi_py/ir/native/PyDecoderBuffer.cpp +++ b/src/clp_ffi_py/ir/native/PyDecoderBuffer.cpp @@ -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(m_read_buffer_mem_owner, buf_capacity); + m_read_buffer = std::span{m_read_buffer_mem_owner, static_cast(buf_capacity)}; m_input_ir_stream = input_stream; Py_INCREF(m_input_ir_stream); return true; @@ -242,7 +242,7 @@ auto PyDecoderBuffer::populate_read_buffer(Py_ssize_t& num_bytes_read) -> bool { PyErr_NoMemory(); return false; } - std::span new_read_buffer{new_buf, static_cast(new_capacity)}; + std::span const new_read_buffer{new_buf, static_cast(new_capacity)}; std::copy( unconsumed_bytes_in_curr_read_buffer.begin(), unconsumed_bytes_in_curr_read_buffer.end(),