1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-06-17 07:37:13 +02:00

Update POCO to 1.11.0

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

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;
}