projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Adapted to stat events
[libfirm]
/
ir
/
adt
/
pqueue.c
diff --git
a/ir/adt/pqueue.c
b/ir/adt/pqueue.c
index
317c82a
..
b721921
100644
(file)
--- a/
ir/adt/pqueue.c
+++ b/
ir/adt/pqueue.c
@@
-56,12
+56,12
@@
struct _pqueue_t {
* Enforces the heap characteristics if the queue
* starting from element at position @p pos.
*/
* Enforces the heap characteristics if the queue
* starting from element at position @p pos.
*/
-static void pqueue_heapify(pqueue *q,
int
pos) {
-
int
len = ARR_LEN(q->elems);
+static void pqueue_heapify(pqueue *q,
unsigned
pos) {
+
unsigned
len = ARR_LEN(q->elems);
while (pos * 2 < len) {
pqueue_el_t tmp;
while (pos * 2 < len) {
pqueue_el_t tmp;
-
int
exchange = pos;
+
unsigned
exchange = pos;
if (q->elems[exchange].key < q->elems[pos * 2].key) {
exchange = pos * 2;
if (q->elems[exchange].key < q->elems[pos * 2].key) {
exchange = pos * 2;
@@
-85,7
+85,7
@@
static void pqueue_heapify(pqueue *q, int pos) {
/**
* Sifts up a newly inserted element at position @p pos.
*/
/**
* Sifts up a newly inserted element at position @p pos.
*/
-static void pqueue_sift_up(pqueue *q,
int
pos) {
+static void pqueue_sift_up(pqueue *q,
unsigned
pos) {
while(q->elems[pos].key > q->elems[pos / 2].key) {
pqueue_el_t tmp;
while(q->elems[pos].key > q->elems[pos / 2].key) {
pqueue_el_t tmp;