diff options
author | gumi <git@gumi.ca> | 2018-04-22 13:17:12 -0400 |
---|---|---|
committer | gumi <git@gumi.ca> | 2018-04-22 13:17:12 -0400 |
commit | 1773557a888a061b7554c4c3e6d34bfd7a804cc3 (patch) | |
tree | 0528786266be3969641f9e86fadec16de0e97bf6 /npc | |
parent | 6c31865241d01c3e960c84ed1949477d140b892a (diff) | |
download | serverdata-1773557a888a061b7554c4c3e6d34bfd7a804cc3.tar.gz serverdata-1773557a888a061b7554c4c3e6d34bfd7a804cc3.tar.bz2 serverdata-1773557a888a061b7554c4c3e6d34bfd7a804cc3.tar.xz serverdata-1773557a888a061b7554c4c3e6d34bfd7a804cc3.zip |
we don't need strcmp for string < string
Diffstat (limited to 'npc')
-rw-r--r-- | npc/functions/array.txt | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/npc/functions/array.txt b/npc/functions/array.txt index 1feef266..6093aa32 100644 --- a/npc/functions/array.txt +++ b/npc/functions/array.txt @@ -424,17 +424,9 @@ S_Partition: .@i = getarg(1) - 1; freeloop(true); - if (isstr(getarg(0))) { - for (.@j = getarg(1); .@j <= getarg(2) - 1; ++.@j) { - if (strcmp(getelementofarray(getarg(0), .@j), getelementofarray(getarg(0), getarg(2))) < 0) { - swap(getelementofarray(getarg(0), ++.@i), getelementofarray(getarg(0), .@j)); - } - } - } else { - for (.@j = getarg(1); .@j <= getarg(2) - 1; ++.@j) { - if (getelementofarray(getarg(0), .@j) < getelementofarray(getarg(0), getarg(2))) { - swap(getelementofarray(getarg(0), ++.@i), getelementofarray(getarg(0), .@j)); - } + for (.@j = getarg(1); .@j <= getarg(2) - 1; ++.@j) { + if (getelementofarray(getarg(0), .@j) < getelementofarray(getarg(0), getarg(2))) { + swap(getelementofarray(getarg(0), ++.@i), getelementofarray(getarg(0), .@j)); } } freeloop(false); |