mirror of
https://github.com/pocoproject/poco.git
synced 2025-01-23 10:36:37 +01:00
Buffer<> swap miss ownMem #1964
This commit is contained in:
parent
59e1a11ec6
commit
4bd692ca38
@ -257,6 +257,7 @@ public:
|
||||
swap(_ptr, other._ptr);
|
||||
swap(_capacity, other._capacity);
|
||||
swap(_used, other._used);
|
||||
swap(_ownMem, other._ownMem);
|
||||
}
|
||||
|
||||
bool operator == (const Buffer& other) const
|
||||
|
@ -348,6 +348,11 @@ void CoreTest::testBuffer()
|
||||
k.append('d');
|
||||
assert (k.size() == 15);
|
||||
assert ( !std::memcmp(k.begin(), "hellohelloworld", k.size()) );
|
||||
|
||||
char my[16];
|
||||
Poco::Buffer<char> buffer(16);
|
||||
Poco::Buffer<char> wrapper(my, sizeof(my));
|
||||
buffer.swap(wrapper);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user