mirror of
https://github.com/NoelFB/blah.git
synced 2024-11-25 16:18:57 +08:00
fixed StackVector copy/move assignment operators
This commit is contained in:
parent
682cc12780
commit
cf1771926d
|
@ -98,7 +98,7 @@ namespace Blah
|
||||||
clear();
|
clear();
|
||||||
|
|
||||||
for (int i = 0; i < src.m_count; i++)
|
for (int i = 0; i < src.m_count; i++)
|
||||||
data()[i] = src.data()[i];
|
new (data() + i) T(std::move(src.data()[i]));
|
||||||
m_count = src.m_count;
|
m_count = src.m_count;
|
||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
|
@ -110,7 +110,7 @@ namespace Blah
|
||||||
clear();
|
clear();
|
||||||
|
|
||||||
for (int i = 0; i < src.m_count; i++)
|
for (int i = 0; i < src.m_count; i++)
|
||||||
data()[i] = std::move(src.data()[i]);
|
new (data() + i) T(std::move(src.data()[i]));
|
||||||
m_count = src.m_count;
|
m_count = src.m_count;
|
||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user