| 75 | }; |
| 76 | |
| 77 | void |
| 78 | Base::sort() { |
| 79 | Base** b = Gecode::heap.alloc<Base*>(_n_tests); |
| 80 | unsigned int i=0; |
| 81 | for (Base* t = _tests; t != nullptr; t = t->next()) |
| 82 | b[i++] = t; |
| 83 | SortByName sbn; |
| 84 | Gecode::Support::quicksort(b, _n_tests,sbn); |
| 85 | i=0; |
| 86 | _tests = nullptr; |
| 87 | for ( ; i < _n_tests; i++) { |
| 88 | b[i]->next(_tests); _tests = b[i]; |
| 89 | } |
| 90 | Gecode::heap.free(b,_n_tests); |
| 91 | } |
| 92 | |
| 93 | Base::~Base() = default; |
| 94 |