mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2026-11-13 15:27:09 +01:00
Update POCO to 1.11.0
This commit is contained in:
1 parent
151077c799
commit
7a3d92d1d1
450 files changed
+25219
-6528
No files matched your search
+4
-3
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user