Skip to content

Commit 9d544cb

Browse files
committed
DSUtil: добавлен конструктор копирования для CSimpleBlock.
1 parent a0cd412 commit 9d544cb

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/DSUtil/SimpleBuffer.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ class CSimpleBlock
3737
size_t m_size = 0;
3838

3939
public:
40+
CSimpleBlock() = default;
41+
CSimpleBlock(const CSimpleBlock& simpleBlock)
42+
{
43+
SetSize(simpleBlock.m_size);
44+
memcpy(this->m_data.get(), simpleBlock.m_data.get(), simpleBlock.m_size);
45+
}
46+
4047
// Returns pointer to the data.
4148
auto* Data() { return m_data.get(); }
4249
const auto* Data() const { return m_data.get(); }

0 commit comments

Comments
 (0)