encoding: Refactoring EncodingBuffer
Breaks: nfd:commit:c0273e3505ac2ccf843401be77a513d8eb663127
Breaks: ChronoSync:commit:e042f83a1df184a8e7a90ef00034d11026891cd1
Change-Id: I8275c6276c5ecfa280f87f584189907521febf5f
Refs: #2494, #2490
diff --git a/src/encoding/block.cpp b/src/encoding/block.cpp
index e8d2cf9..ce13427 100644
--- a/src/encoding/block.cpp
+++ b/src/encoding/block.cpp
@@ -51,7 +51,7 @@
}
Block::Block(const EncodingBuffer& buffer)
- : m_buffer(buffer.m_buffer)
+ : m_buffer(const_cast<EncodingBuffer&>(buffer).getBuffer())
, m_begin(buffer.begin())
, m_end(buffer.end())
, m_size(m_end - m_begin)