mirror of
https://github.com/Icinga/icinga2.git
synced 2026-05-28 04:12:13 -04:00
Merge pull request #10365 from Icinga/string-vector-move-test
Avoid undefined behavior in string/vector_move test
This commit is contained in:
commit
cefe1bc27a
1 changed files with 1 additions and 1 deletions
|
|
@ -117,7 +117,7 @@ BOOST_AUTO_TEST_CASE(vector_move)
|
|||
|
||||
void *oldAddr = vec[0].GetData().data();
|
||||
// Sanity check that the data buffer is actually allocated outside the icinga::String instance.
|
||||
BOOST_CHECK(!(&vec[0] <= oldAddr && oldAddr < &vec[1]));
|
||||
BOOST_CHECK(!(vec.data() <= oldAddr && oldAddr < vec.data() + vec.size()));
|
||||
|
||||
// Force the vector to grow.
|
||||
vec.reserve(vec.capacity() + 1);
|
||||
|
|
|
|||
Loading…
Reference in a new issue