OSDN Git Service
(root)
/
mikumikustudio
/
libgdx-mikumikustudio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fb4c7ce
)
Don't rely on comparator returning -1
author
hneuer
<hanno.neuer@gmail.com>
Mon, 30 Sep 2013 06:39:54 +0000
(08:39 +0200)
committer
hneuer
<hanno.neuer@gmail.com>
Mon, 30 Sep 2013 06:39:54 +0000
(08:39 +0200)
gdx/src/com/badlogic/gdx/utils/QuickSelect.java
patch
|
blob
|
history
diff --git
a/gdx/src/com/badlogic/gdx/utils/QuickSelect.java
b/gdx/src/com/badlogic/gdx/utils/QuickSelect.java
index
00ac18e
..
460e877
100644
(file)
--- a/
gdx/src/com/badlogic/gdx/utils/QuickSelect.java
+++ b/
gdx/src/com/badlogic/gdx/utils/QuickSelect.java
@@
-25,7
+25,7
@@
public class QuickSelect<T> {
swap(right, pivot);
int storage = left;
for (int i = left; i < right; i++) {
- if (comp.compare(array[i], pivotValue)
== -1
) {
+ if (comp.compare(array[i], pivotValue)
< 0
) {
swap(storage, i);
storage++;
}