Sync changes from upstream repository

Co-authored-by: Andrew Le Bihan <andy@mcneel.com>
Co-authored-by: chuck <chuck@mcneel.com>
Co-authored-by: Dale Fugier <dale@mcneel.com>
Co-authored-by: Dale Lear <dalelear@mcneel.com>
Co-authored-by: David Eränen <david.eranen@mcneel.com>
Co-authored-by: Greg Arden <greg@mcneel.com>
Co-authored-by: John Croudy <john.croudy@mcneel.com>
Co-authored-by: Lowell Walmsley <lowell@mcneel.com>
Co-authored-by: Nathan Letwory <nathan@mcneel.com>
Co-authored-by: piac <giulio@mcneel.com>
Co-authored-by: Steve Baer <steve@mcneel.com>
Co-authored-by: Tim Hemmelman <tim@mcneel.com>
This commit is contained in:
Bozo The Builder
2020-03-12 09:00:26 -07:00
parent acbc998a03
commit 01cdb463e6
50 changed files with 5774 additions and 1857 deletions

View File

@@ -494,6 +494,11 @@ void ON_SimpleArray<T>::Append( const T& x )
p = (T*)temp;
}
Reserve(newcapacity);
if (nullptr == m_a)
{
ON_ERROR("allocation failure");
return;
}
}
m_a[m_count++] = *p;
if (p != &x)
@@ -1572,11 +1577,21 @@ void ON_ClassArray<T>::Append( const T& x )
T temp; // ON_*Array<> templates do not require robust copy constructor.
temp = x; // ON_*Array<> templates require a robust operator=.
Reserve( newcapacity );
if (nullptr == m_a)
{
ON_ERROR("allocation failure");
return;
}
m_a[m_count++] = temp;
return;
}
}
Reserve(newcapacity);
if (nullptr == m_a)
{
ON_ERROR("allocation failure");
return;
}
}
m_a[m_count++] = x;
}