Update POCO to 1.11.0

This commit is contained in:
Sandu Liviu Catalin committed 2021-08-22 18:07:06 +03:00
1 parent 151077c799
commit 7a3d92d1d1
450 files changed
+25219 -6528

No files matched your search

+4 -3
View File
@@ -159,7 +159,7 @@ public:
if (newCapacity > _capacity)
{
T* ptr = new T[newCapacity];
if (preserveContent)
if (preserveContent && _ptr)
{
std::memcpy(ptr, _ptr, _used * sizeof(T));
}
@@ -191,7 +191,7 @@ public:
if (newCapacity > 0)
{
ptr = new T[newCapacity];
if (preserveContent)
if (preserveContent && _ptr)
{
std::size_t newSz = _used < newCapacity ? _used : newCapacity;
std::memcpy(ptr, _ptr, newSz * sizeof(T));
@@ -266,10 +266,11 @@ public:
{
if (_used == other._used)
{
if (std::memcmp(_ptr, other._ptr, _used * sizeof(T)) == 0)
if (_ptr && other._ptr && std::memcmp(_ptr, other._ptr, _used * sizeof(T)) == 0)
{
return true;
}
else return _used == 0;
}
return false;
}