diff --git a/Release/include/cpprest/containerstream.h b/Release/include/cpprest/containerstream.h index 6e949a75e..02fe55459 100644 --- a/Release/include/cpprest/containerstream.h +++ b/Release/include/cpprest/containerstream.h @@ -399,12 +399,7 @@ class basic_container_buffer : public streams::details::streambuf_state_manager< auto readBegin = std::begin(m_data) + m_current_position; auto readEnd = std::begin(m_data) + newPos; -#if defined(_ITERATOR_DEBUG_LEVEL) && _ITERATOR_DEBUG_LEVEL != 0 - // Avoid warning C4996: Use checked iterators under SECURE_SCL - std::copy(readBegin, readEnd, stdext::checked_array_iterator<_CharType*>(ptr, count)); -#else std::copy(readBegin, readEnd, ptr); -#endif // _WIN32 if (advance) { diff --git a/Release/include/cpprest/producerconsumerstream.h b/Release/include/cpprest/producerconsumerstream.h index 3487c4606..c33a4af2a 100644 --- a/Release/include/cpprest/producerconsumerstream.h +++ b/Release/include/cpprest/producerconsumerstream.h @@ -439,12 +439,7 @@ class basic_producer_consumer_buffer : public streams::details::streambuf_state_ _CharType* beg = rbegin(); _CharType* end = rbegin() + countRead; -#if defined(_ITERATOR_DEBUG_LEVEL) && _ITERATOR_DEBUG_LEVEL != 0 - // Avoid warning C4996: Use checked iterators under SECURE_SCL - std::copy(beg, end, stdext::checked_array_iterator<_CharType*>(dest, count)); -#else std::copy(beg, end, dest); -#endif // _WIN32 if (advance) { @@ -462,12 +457,7 @@ class basic_producer_consumer_buffer : public streams::details::streambuf_state_ const _CharType* srcEnd = src + countWritten; -#if defined(_ITERATOR_DEBUG_LEVEL) && _ITERATOR_DEBUG_LEVEL != 0 - // Avoid warning C4996: Use checked iterators under SECURE_SCL - std::copy(src, srcEnd, stdext::checked_array_iterator<_CharType*>(wbegin(), static_cast(avail))); -#else std::copy(src, srcEnd, wbegin()); -#endif // _WIN32 update_write_head(countWritten); return countWritten; diff --git a/Release/include/cpprest/rawptrstream.h b/Release/include/cpprest/rawptrstream.h index 1f15ecbe7..40842a559 100644 --- a/Release/include/cpprest/rawptrstream.h +++ b/Release/include/cpprest/rawptrstream.h @@ -439,12 +439,7 @@ class basic_rawptr_buffer : public streams::details::streambuf_state_manager<_Ch auto readBegin = m_data + m_current_position; auto readEnd = m_data + newPos; -#if defined(_ITERATOR_DEBUG_LEVEL) && _ITERATOR_DEBUG_LEVEL != 0 - // Avoid warning C4996: Use checked iterators under SECURE_SCL - std::copy(readBegin, readEnd, stdext::checked_array_iterator<_CharType*>(ptr, count)); -#else std::copy(readBegin, readEnd, ptr); -#endif // _WIN32 if (advance) { @@ -465,13 +460,8 @@ class basic_rawptr_buffer : public streams::details::streambuf_state_manager<_Ch if (newSize > m_size) throw std::runtime_error("Writing past the end of the buffer"); - // Copy the data -#if defined(_ITERATOR_DEBUG_LEVEL) && _ITERATOR_DEBUG_LEVEL != 0 - // Avoid warning C4996: Use checked iterators under SECURE_SCL - std::copy(ptr, ptr + count, stdext::checked_array_iterator<_CharType*>(m_data, m_size, m_current_position)); -#else + // Copy the data std::copy(ptr, ptr + count, m_data + m_current_position); -#endif // _WIN32 // Update write head and satisfy pending reads if any update_current_position(newSize);