Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions Release/include/cpprest/containerstream.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
10 changes: 0 additions & 10 deletions Release/include/cpprest/producerconsumerstream.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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<size_t>(avail)));
#else
std::copy(src, srcEnd, wbegin());
#endif // _WIN32

update_write_head(countWritten);
return countWritten;
Expand Down
12 changes: 1 addition & 11 deletions Release/include/cpprest/rawptrstream.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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);
Expand Down