forked from organicmaps/organicmaps
Removed reserve(N+1) in buffer_vector. It’s a stupid logic when we have a sequence of push_back or emplace_back calls.
This commit is contained in:
parent
65251a9d86
commit
fd3fbfce5a
2 changed files with 0 additions and 5 deletions
|
@ -74,12 +74,9 @@ UNIT_TEST(BufferVectorSwap)
|
|||
TEST_EQUAL ( v1[0][0], 666, () );
|
||||
TEST_EQUAL ( dd1, v1[0].data(), () );
|
||||
|
||||
// resize from 1 to 7 => will push_back v[0] to new place
|
||||
// (??? but can stay at the same place ???)
|
||||
v1.resize(7);
|
||||
TEST_EQUAL ( v1[0].size(), 1, () );
|
||||
TEST_EQUAL ( v1[0][0], 666, () );
|
||||
TEST_NOT_EQUAL ( dd1, v1[0].data(), () );
|
||||
}
|
||||
|
||||
{
|
||||
|
|
|
@ -278,7 +278,6 @@ public:
|
|||
else
|
||||
{
|
||||
ASSERT_EQUAL(m_size, N, ());
|
||||
m_dynamic.reserve(N + 1);
|
||||
SwitchToDynamic();
|
||||
m_dynamic.push_back(t);
|
||||
ASSERT_EQUAL(m_dynamic.size(), N + 1, ());
|
||||
|
@ -297,7 +296,6 @@ public:
|
|||
else
|
||||
{
|
||||
ASSERT_EQUAL(m_size, N, ());
|
||||
m_dynamic.reserve(N + 1);
|
||||
SwitchToDynamic();
|
||||
m_dynamic.push_back(move(t));
|
||||
ASSERT_EQUAL(m_dynamic.size(), N + 1, ());
|
||||
|
|
Loading…
Add table
Reference in a new issue