aboutsummaryrefslogtreecommitdiff
path: root/src/zencore
diff options
context:
space:
mode:
Diffstat (limited to 'src/zencore')
-rw-r--r--src/zencore/include/zencore/compositebuffer.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/zencore/include/zencore/compositebuffer.h b/src/zencore/include/zencore/compositebuffer.h
index cc03dd156..1b6944fc0 100644
--- a/src/zencore/include/zencore/compositebuffer.h
+++ b/src/zencore/include/zencore/compositebuffer.h
@@ -125,11 +125,7 @@ private:
{
m_Segments.insert(m_Segments.end(), begin(Buffer.m_Segments), end(Buffer.m_Segments));
}
- inline void AppendBuffers(CompositeBuffer&& Buffer)
- {
- // TODO: this operates just like the by-reference version above
- m_Segments.insert(m_Segments.end(), begin(Buffer.m_Segments), end(Buffer.m_Segments));
- }
+ inline void AppendBuffers(CompositeBuffer&& Buffer) { AppendBuffers(std::move(Buffer.m_Segments)); }
static inline size_t GetBufferCount(const SharedBuffer&) { return 1; }
inline void AppendBuffers(const SharedBuffer& Buffer) { m_Segments.push_back(Buffer); }
@@ -138,7 +134,7 @@ private:
static inline size_t GetBufferCount(std::vector<SharedBuffer>&& Container) { return Container.size(); }
inline void AppendBuffers(std::vector<SharedBuffer>&& Container)
{
- m_Segments.insert(m_Segments.end(), begin(Container), end(Container));
+ m_Segments.insert(m_Segments.end(), std::make_move_iterator(Container.begin()), std::make_move_iterator(Container.end()));
}
private: