mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-20 20:19:32 +00:00
ICU-96 include stdlib.h for qsort, do not sort just one range
X-SVN-Rev: 3980
This commit is contained in:
parent
746f7b4216
commit
4c2deb23a8
1 changed files with 7 additions and 2 deletions
|
@ -22,6 +22,9 @@
|
|||
# include <stdio.h>
|
||||
#endif
|
||||
|
||||
/* we are using qsort() */
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "unicode/utypes.h"
|
||||
#include "cmemory.h"
|
||||
#include "ucol_wgt.h"
|
||||
|
@ -434,8 +437,10 @@ ucol_allocWeights(uint32_t lowerLimit, uint32_t upperLimit, uint32_t n, WeightRa
|
|||
}
|
||||
}
|
||||
|
||||
/* sort the ranges by weight values */
|
||||
qsort(ranges, rangeCount, sizeof(WeightRange), compareRanges);
|
||||
if(rangeCount>1) {
|
||||
/* sort the ranges by weight values */
|
||||
qsort(ranges, rangeCount, sizeof(WeightRange), compareRanges);
|
||||
}
|
||||
|
||||
#ifdef UCOL_DEBUG
|
||||
puts("final ranges:");
|
||||
|
|
Loading…
Add table
Reference in a new issue