diff --git a/include/fast_io_core_impl/operations/readimpl/scatterbytes.h b/include/fast_io_core_impl/operations/readimpl/scatterbytes.h index 468116e0c..2530d619d 100644 --- a/include/fast_io_core_impl/operations/readimpl/scatterbytes.h +++ b/include/fast_io_core_impl/operations/readimpl/scatterbytes.h @@ -52,7 +52,7 @@ inline constexpr io_scatter_status_t scatter_read_some_bytes_cold_impl(instmtype [[__gnu__::__may_alias__]] #endif = basic_io_scatter_t *; - return ::fast_io::details::scatter_read_some_cold_impl(insm, reinterpret_cast(pscatters), + return ::fast_io::details::scatter_read_some_cold_impl(insm, reinterpret_cast(const_cast<::fast_io::io_scatter_t *>(pscatters)), n); } else if constexpr (::fast_io::operations::decay::defines::has_input_or_io_stream_seek_bytes_define && @@ -72,7 +72,7 @@ inline constexpr io_scatter_status_t scatter_read_some_bytes_cold_impl(instmtype [[__gnu__::__may_alias__]] #endif = basic_io_scatter_t *; - auto ret{scatter_pread_some_cold_impl(insm, reinterpret_cast(pscatters), n, 0)}; + auto ret{scatter_pread_some_cold_impl(insm, reinterpret_cast(const_cast<::fast_io::io_scatter_t *>(pscatters)), n, 0)}; ::fast_io::operations::decay::input_stream_seek_decay(insm, ::fast_io::fposoffadd_scatters(0, pscatters, ret), ::fast_io::seekdir::cur); return ret; @@ -220,7 +220,7 @@ inline constexpr void scatter_read_all_bytes_cold_impl(instmtype insm, io_scatte [[__gnu__::__may_alias__]] #endif = basic_io_scatter_t *; - ::fast_io::details::scatter_read_all_impl(insm, reinterpret_cast(pscatters), n); + ::fast_io::details::scatter_read_all_impl(insm, reinterpret_cast(const_cast<::fast_io::io_scatter_t *>(pscatters)), n); } else if constexpr (::fast_io::operations::decay::defines::has_input_or_io_stream_seek_bytes_define && (::fast_io::operations::decay::defines::has_any_of_pread_bytes_operations)) @@ -238,7 +238,7 @@ inline constexpr void scatter_read_all_bytes_cold_impl(instmtype insm, io_scatte [[__gnu__::__may_alias__]] #endif = basic_io_scatter_t *; - scatter_pread_all_cold_impl(insm, reinterpret_cast(pscatters), n, 0); + scatter_pread_all_cold_impl(insm, reinterpret_cast(const_cast<::fast_io::io_scatter_t *>(pscatters)), n, 0); ::fast_io::operations::decay::input_stream_seek_decay( insm, ::fast_io::fposoffadd_scatters(0, pscatters, {n, 0}), ::fast_io::seekdir::cur); } diff --git a/include/fast_io_core_impl/operations/readimpl/scatterpbytes.h b/include/fast_io_core_impl/operations/readimpl/scatterpbytes.h index ccb415e79..85a34838f 100644 --- a/include/fast_io_core_impl/operations/readimpl/scatterpbytes.h +++ b/include/fast_io_core_impl/operations/readimpl/scatterpbytes.h @@ -64,7 +64,7 @@ inline constexpr io_scatter_status_t scatter_pread_some_bytes_cold_impl(instmtyp [[__gnu__::__may_alias__]] #endif = basic_io_scatter_t *; - return ::fast_io::details::scatter_pread_some_cold_impl(insm, reinterpret_cast(pscatters), + return ::fast_io::details::scatter_pread_some_cold_impl(insm, reinterpret_cast(const_cast<::fast_io::io_scatter_t *>(pscatters)), n, off); } else if constexpr (::fast_io::operations::decay::defines::has_input_or_io_stream_seek_bytes_define && @@ -97,7 +97,7 @@ inline constexpr io_scatter_status_t scatter_pread_some_bytes_impl(instmtype ins ::fast_io::operations::decay::stream_ref_decay_lock_guard lg{ ::fast_io::operations::decay::input_stream_mutex_ref_decay(insm)}; return ::fast_io::details::scatter_pread_some_bytes_impl( - ::fast_io::operations::decay::input_stream_unlocked_ref_decay(insm), pscatters, n, off); + ::fast_io::operations::decay::input_stream_unlocked_ref_decay(insm), const_cast<::fast_io::io_scatter_t *>(pscatters), n, off); } else { @@ -176,7 +176,7 @@ inline constexpr void scatter_pread_all_bytes_cold_impl(instmtype insm, io_scatt [[__gnu__::__may_alias__]] #endif = basic_io_scatter_t *; - ::fast_io::details::scatter_pread_all_impl(insm, reinterpret_cast(pscatters), n, off); + ::fast_io::details::scatter_pread_all_impl(insm, reinterpret_cast(const_cast<::fast_io::io_scatter_t *>(pscatters)), n, off); } else if constexpr (::fast_io::operations::decay::defines::has_input_or_io_stream_seek_bytes_define && (::fast_io::operations::decay::defines::has_any_of_read_bytes_operations))