llde / xOBSE

Oblivion Script extender source
250 stars 36 forks source link

Remove limitation on using array of arrays for ar_CustomSort. #219

Closed ir4ne closed 1 year ago

ir4ne commented 1 year ago

Currently there is a limitation on sorting an array of arrays with ar_CustomSort: it will just silently return an empty array as a result.

if (dataType == kDataType_Invalid || dataType == kDataType_Array)    // nonsensical to sort array of arrays
        return result;

But this limitation makes no sense, as StringMap arrays are often used for storing complex data structures, and using custom comparators for custom data structures is probably the most common usecase for them.