mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Add a 'sort' function to an STArray. They can be used in cases where
order is significant or where they're sorted.
This commit is contained in:
@@ -866,6 +866,11 @@ STArray* STArray::construct(SerializerIterator& sit, SField::ref field)
|
||||
return new STArray(field, value);
|
||||
}
|
||||
|
||||
void STArray::sort(bool (*compare)(const STObject&, const STObject&))
|
||||
{
|
||||
std::sort(value.begin(), value.end(), compare);
|
||||
}
|
||||
|
||||
std::auto_ptr<STObject> STObject::parseJson(const Json::Value& object, SField::ref inName, int depth)
|
||||
{
|
||||
if (!object.isObject())
|
||||
|
||||
Reference in New Issue
Block a user