After reading your answer and thinking a bit I've got this code to work: static bool CompareGetDistances(Value &a, Value &b) { return a[5] < b[5]; } ... ValueArray &rows = SomeValuaArrayOfValueMap(); Vector<Value> &vv = const_cast< Vector<Value>& >(rows.Get()); Sort(vv, CompareGetDistances); ... Thanks for your help !
static bool CompareGetDistances(Value &a, Value &b) { return a[5] < b[5]; } ... ValueArray &rows = SomeValuaArrayOfValueMap(); Vector<Value> &vv = const_cast< Vector<Value>& >(rows.Get()); Sort(vv, CompareGetDistances); ...
Vector<Value> v = clone(va.Get()); Sort(v); va = ValueArray(pick(v));
Report message to a moderator