mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Modernize code:
* Clean STBase-derived class creation interfaces * Annotate overriden STBase virtual functions * Optimize path deserialization * Prefer range-based for * Prefer std::unique_ptr * Remove BOOST_FOREACH
This commit is contained in:
@@ -138,12 +138,6 @@ STBase::getFName() const
|
||||
return *fName;
|
||||
}
|
||||
|
||||
std::unique_ptr<STBase>
|
||||
STBase::clone() const
|
||||
{
|
||||
return std::unique_ptr<STBase> (duplicate());
|
||||
}
|
||||
|
||||
void
|
||||
STBase::addFieldID (Serializer& s) const
|
||||
{
|
||||
@@ -162,7 +156,7 @@ STBase::deserialize (SField::ref name)
|
||||
STBase*
|
||||
new_clone (const STBase& s)
|
||||
{
|
||||
STBase* const copy (s.clone ().release ());
|
||||
STBase* const copy (s.duplicate ().release ());
|
||||
assert (typeid (*copy) == typeid (s));
|
||||
return copy;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user