Commit c79dbaa3 authored by Christian Würdig's avatar Christian Würdig
Browse files

changed key to double

added missing void declaration

[r13411]
parent 3c53cd3d
......@@ -21,7 +21,7 @@
typedef struct _pqueue_el_t {
void *data;
int key;
double key;
} pqueue_el_t;
struct _pqueue_t {
......@@ -77,7 +77,7 @@ static void pqueue_sift_up(pqueue *q, int pos) {
* Creates a new priority queue.
* @return A priority queue of initial length 0.
*/
pqueue *new_pqueue() {
pqueue *new_pqueue(void) {
pqueue *res = xmalloc(sizeof(*res));
res->elems = NEW_ARR_F(pqueue_el_t, 0);
return res;
......@@ -98,7 +98,7 @@ void del_pqueue(pqueue *q) {
* @param data The actual data which should be stored in the queue.
* @param key The priority for the data.
*/
void pqueue_put(pqueue *q, void *data, int key) {
void pqueue_put(pqueue *q, void *data, double key) {
pqueue_el_t el;
el.data = data;
......
......@@ -16,7 +16,7 @@ typedef struct _pqueue_t pqueue;
* Creates a new priority queue.
* @return A priority queue of initial length 0.
*/
pqueue *new_pqueue();
pqueue *new_pqueue(void);
/**
* Frees all memory allocated by the priority queue.
......@@ -30,7 +30,7 @@ void del_pqueue(pqueue *q);
* @param data The actual data which should be stored in the queue.
* @param key The priority for the data.
*/
void pqueue_put(pqueue *q, void *data, int key);
void pqueue_put(pqueue *q, void *data, double key);
/**
* Returns and removes the first element, ie. that one with the highest priority, from the queue.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment