merged to 1.9.0-b1

re-added the copy assignment constructor for STArray
This commit is contained in:
Richard Holland
2022-03-21 11:27:14 +00:00
129 changed files with 3448 additions and 2158 deletions

View File

@@ -42,11 +42,6 @@ STArray::STArray(int n)
v_.reserve(n);
}
STArray::STArray(std::vector<STObject> const& v, SField const& f) : STBase(f)
{
v_ = v;
}
STArray::STArray(SField const& f) : STBase(f)
{
}
@@ -56,6 +51,11 @@ STArray::STArray(SField const& f, int n) : STBase(f)
v_.reserve(n);
}
STArray::STArray(std::vector<STObject> const& v, SField const& f) : STBase(f)
{
v_ = v;
}
STArray::STArray(SerialIter& sit, SField const& f, int depth) : STBase(f)
{
while (!sit.empty())
@@ -94,6 +94,18 @@ STArray::STArray(SerialIter& sit, SField const& f, int depth) : STBase(f)
}
}
STBase*
STArray::copy(std::size_t n, void* buf) const
{
return emplace(n, buf, *this);
}
STBase*
STArray::move(std::size_t n, void* buf)
{
return emplace(n, buf, std::move(*this));
}
std::string
STArray::getFullText() const
{
@@ -158,6 +170,12 @@ STArray::add(Serializer& s) const
}
}
SerializedTypeID
STArray::getSType() const
{
return STI_ARRAY;
}
bool
STArray::isEquivalent(const STBase& t) const
{
@@ -165,6 +183,12 @@ STArray::isEquivalent(const STBase& t) const
return v != nullptr && v_ == v->v_;
}
bool
STArray::isDefault() const
{
return v_.empty();
}
void
STArray::sort(bool (*compare)(const STObject&, const STObject&))
{