mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02: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
@ -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…
x
Reference in New Issue
Block a user