diff --git a/src/OpenFOAM/containers/Lists/SortableList/SortableList.C b/src/OpenFOAM/containers/Lists/SortableList/SortableList.C index 7cde863a6321e7f59c73c54635589723ff1fab8f..a4264578d1071c4ba0192b2c44106fce43b94746 100644 --- a/src/OpenFOAM/containers/Lists/SortableList/SortableList.C +++ b/src/OpenFOAM/containers/Lists/SortableList/SortableList.C @@ -86,28 +86,7 @@ void Foam::SortableList<Type>::sort() indices_[i] = i; } - Foam::sort(indices_, less(*this)); - - List<Type> tmpValues(this->size()); - - forAll(indices_, i) - { - tmpValues[i] = this->operator[](indices_[i]); - } - - List<Type>::transfer(tmpValues); -} - - - -template <class Type> -void Foam::SortableList<Type>::stableSort() -{ - forAll(indices_, i) - { - indices_[i] = i; - } - + //Foam::sort(indices_, less(*this)); Foam::stableSort(indices_, less(*this)); List<Type> tmpValues(this->size()); diff --git a/src/OpenFOAM/containers/Lists/SortableList/SortableList.H b/src/OpenFOAM/containers/Lists/SortableList/SortableList.H index a9ab2ae8294a13f04fe5a4230fcbf4e2ec5c69ed..dd0f0af0d43bb357b6059d572c97b22e2a306b68 100644 --- a/src/OpenFOAM/containers/Lists/SortableList/SortableList.H +++ b/src/OpenFOAM/containers/Lists/SortableList/SortableList.H @@ -109,12 +109,9 @@ public: //- Size the list. If grow can cause undefined indices (until next sort) void setSize(const label); - //- Sort the list (if changed after construction time) + //- (stable) sort the list (if changed after construction time) void sort(); - //- Sort the list (if changed after construction time) - void stableSort(); - // Member Operators