Skip to content

Commit

Permalink
Fixed: Pointer type conflicts with callback functions
Browse files Browse the repository at this point in the history
The signature of the callback functions differed from what was expected.
  • Loading branch information
skyjake committed Mar 11, 2012
1 parent 54ba0e2 commit 07b964e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
8 changes: 4 additions & 4 deletions doomsday/engine/portable/src/blockmapvisual.c
Expand Up @@ -143,7 +143,7 @@ static int rendBspLeaf(BspLeaf* bspLeaf, void* parameters)
int rendCellLineDefs(Blockmap* blockmap, uint const coords[2], void* parameters)
{
glBegin(GL_LINES);
Blockmap_IterateCellObjects(blockmap, coords, rendLineDef, parameters);
Blockmap_IterateCellObjects(blockmap, coords, (int (*)(void*,void*)) rendLineDef, parameters);
glEnd();
return false; // Continue iteration.
}
Expand All @@ -156,22 +156,22 @@ int rendCellPolyobjLineDefs(void* object, void* parameters)
int rendCellPolyobjs(Blockmap* blockmap, uint const coords[2], void* parameters)
{
glBegin(GL_LINES);
Blockmap_IterateCellObjects(blockmap, coords, rendCellPolyobjLineDefs, parameters);
Blockmap_IterateCellObjects(blockmap, coords, (int (*)(void*,void*)) rendCellPolyobjLineDefs, parameters);
glEnd();
return false; // Continue iteration.
}

int rendCellMobjs(Blockmap* blockmap, uint const coords[2], void* parameters)
{
glBegin(GL_QUADS);
Blockmap_IterateCellObjects(blockmap, coords, rendMobj, parameters);
Blockmap_IterateCellObjects(blockmap, coords, (int (*)(void*,void*)) rendMobj, parameters);
glEnd();
return false; // Continue iteration.
}

int rendCellBspLeafs(Blockmap* blockmap, uint const coords[2], void* parameters)
{
Blockmap_IterateCellObjects(blockmap, coords, rendBspLeaf, parameters);
Blockmap_IterateCellObjects(blockmap, coords, (int (*)(void*,void*)) rendBspLeaf, parameters);
return false; // Continue iteration.
}

Expand Down
3 changes: 1 addition & 2 deletions doomsday/engine/portable/src/gamemap.c
Expand Up @@ -978,9 +978,8 @@ typedef struct poiterparams_s {
void* param;
} poiterparams_t;

int PTR_PolyobjLines(void* object, void* context)
int PTR_PolyobjLines(Polyobj* po, void* context)
{
Polyobj* po = (Polyobj*)object;
poiterparams_t* args = (poiterparams_t*) context;

return Polyobj_LineIterator(po, args->func, args->param);
Expand Down

0 comments on commit 07b964e

Please sign in to comment.