comparison src/share/vm/utilities/quickSort.cpp @ 9160:f2aebc22372a

Fix hotspot optimized build
author Gilles Duboscq <duboscq@ssw.jku.at>
date Tue, 16 Apr 2013 17:17:22 +0200
parents 3c648b9ad052
children 836a62f43af9
comparison
equal deleted inserted replaced
9159:43223d3f5dcd 9160:f2aebc22372a
30 30
31 #include "runtime/os.hpp" 31 #include "runtime/os.hpp"
32 #include "utilities/quickSort.hpp" 32 #include "utilities/quickSort.hpp"
33 #include <stdlib.h> 33 #include <stdlib.h>
34 34
35 #ifdef ASSERT
35 static int test_comparator(int a, int b) { 36 static int test_comparator(int a, int b) {
36 if (a == b) { 37 if (a == b) {
37 return 0; 38 return 0;
38 } 39 }
39 if (a < b) { 40 if (a < b) {
40 return -1; 41 return -1;
41 } 42 }
42 return 1; 43 return 1;
43 } 44 }
45 #endif // ASSERT
44 46
45 static int test_even_odd_comparator(int a, int b) { 47 static int test_even_odd_comparator(int a, int b) {
46 bool a_is_odd = (a % 2) == 1; 48 bool a_is_odd = (a % 2) == 1;
47 bool b_is_odd = (b % 2) == 1; 49 bool b_is_odd = (b % 2) == 1;
48 if (a_is_odd == b_is_odd) { 50 if (a_is_odd == b_is_odd) {