Be explicit about our nooploops.

git-svn-id: https://samskivert.googlecode.com/svn/trunk@2638 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
samskivert
2009-09-15 04:39:28 +00:00
parent 09b591acab
commit da789e49a8
2 changed files with 9 additions and 10 deletions
+1 -2
View File
@@ -343,8 +343,7 @@ public class HashIntMap<V> extends AbstractMap<Integer,V>
// if we're not pointing to an entry, search for the next
// non-empty hash chain
if (_record == null) {
while ((_index-- > 0) &&
((_record = _buckets[_index]) == null));
while ((_index-- > 0) && ((_record = _buckets[_index]) == null)) { /* loop! */ }
}
// keep track of the last thing we returned
+8 -8
View File
@@ -97,11 +97,11 @@ public class QuickSort
for (;;) {
// find the first element that is greater than or equal to the partition element
// starting from the left index
while (comp.compare(a[++lo], mid) < 0);
while (comp.compare(a[++lo], mid) < 0) { /* loop! */ }
// find an element that is smaller than or equal to the partition element starting from
// the right index
while (comp.compare(mid, a[--hi]) < 0);
while (comp.compare(mid, a[--hi]) < 0) { /* loop! */ }
// swap the two elements or bail out of the loop
if (hi > lo) {
@@ -161,11 +161,11 @@ public class QuickSort
for (;;) {
// find the first element that is greater than or equal to the partition element
// starting from the left index
while (comp.compare(mid, a[++lo]) < 0);
while (comp.compare(mid, a[++lo]) < 0) { /* loop! */ }
// find an element that is smaller than or equal to the partition element starting from
// the right index
while (comp.compare(a[--hi], mid) < 0);
while (comp.compare(a[--hi], mid) < 0) { /* loop! */ }
// swap the two elements or bail out of the loop
if (hi > lo) {
@@ -224,11 +224,11 @@ public class QuickSort
for (;;) {
// find the first element that is greater than or equal to the partition element
// starting from the left Index.
while (mid.compareTo(a[++lo]) > 0);
while (mid.compareTo(a[++lo]) > 0) { /* loop! */ }
// find an element that is smaller than or equal to the partition element starting from
// the right Index.
while (mid.compareTo(a[--hi]) < 0);
while (mid.compareTo(a[--hi]) < 0) { /* loop! */ }
// swap the two elements or bail out of the loop
if (hi > lo) {
@@ -287,11 +287,11 @@ public class QuickSort
for (;;) {
// find the first element that is greater than or equal to the partition element
// starting from the left index
while (mid.compareTo(a[++lo]) < 0);
while (mid.compareTo(a[++lo]) < 0) { /* loop! */ }
// find an element that is smaller than or equal to the partition element starting from
// the right index
while (mid.compareTo(a[--hi]) > 0);
while (mid.compareTo(a[--hi]) > 0) { /* loop! */ }
// swap the two elements or bail out of the loop
if (hi > lo) {