diff --git a/toolbox/src/base/Signal.cpp b/toolbox/src/base/Signal.cpp index 2f1abad62..906252d2a 100644 --- a/toolbox/src/base/Signal.cpp +++ b/toolbox/src/base/Signal.cpp @@ -320,10 +320,8 @@ bool Signal::setBuffer(const T* data, const unsigned& length) std::copy(data, data + length, getBuffer()); break; case DataFormat::CONTIGUOUS_ZEROCOPY: - // Reset current data - std::fill(getBuffer(), getBuffer() + m_width, 0); - // Copy new data - std::copy(data, data + length, getBuffer()); + // Override the buffer pointer + m_bufferPtr = static_cast(const_cast(data)); // Update the width m_width = length; break;