Revision 47c4b975

View differences:

include/cmessageheap.h
198 198
    /**
199 199
     * Returns the number of messages in the heap.
200 200
     */
201
    int getLength() const {return /*cblength() +*/ (int)AO_load(&n);}
201
    int getLength() const {return /*cblength() +*/ (int)AO_load((AO_t*)&n);}
202 202

  
203 203
    /**
204 204
     * Returns true if the heap is empty.
205 205
     */
206
    bool isEmpty() const {return /*cbhead==cbtail &&*/ AO_load(&n)==0;}
206
    bool isEmpty() const {return /*cbhead==cbtail &&*/ AO_load((AO_t*)&n)==0;}
207 207

  
208 208
    /**
209 209
     * Alias for getLength().
src/sim/cmessageheap.cc
138 138
    cOwnedObject::operator=(heap);
139 139

  
140 140
    // copy heap
141
    AO_store(&n, (int)AO_load(&(heap.n)));
141
    AO_store(&n, (int)AO_load((AO_t*)&(heap.n)));
142 142
    size = heap.size;
143 143
    delete [] h;
144 144
    h = new cMessage *[size+1];
......
259 259

  
260 260
cMessage *cMessageHeap::peekFirst() const
261 261
{
262
    return /*cbhead!=cbtail ? cb[cbhead] : */(int)AO_load(&n)!=0 ? h[1] : NULL;
262
    return /*cbhead!=cbtail ? cb[cbhead] : */(int)AO_load((AO_t*)&n)!=0 ? h[1] : NULL;
263 263
}
264 264

  
265 265
cMessage *cMessageHeap::removeFirst()

Also available in: Unified diff