mirror of
https://github.com/RTimothyEdwards/magic.git
synced 2026-10-06 09:53:00 +02:00
Don't cast pointer to struct and back again in DBDiagonalProc()
This commit is contained in:
committed by
Anton Blanchard
parent
f06f3b47db
commit
eedc0c89a1
+3
-4
@@ -1315,7 +1315,7 @@ nmdone:
|
||||
* DBDiagonalProc(type) --
|
||||
*
|
||||
* Return the result type of a diagonal tile painted on oldtype;
|
||||
* Argument "cdata", gives direction and side of diagonal, and the
|
||||
* Argument "dinfo", gives direction and side of diagonal, and the
|
||||
* paint result table for the given diagonal side.
|
||||
*
|
||||
* If the result cannot be described with a single tile, then
|
||||
@@ -1333,14 +1333,13 @@ nmdone:
|
||||
*/
|
||||
|
||||
int
|
||||
DBDiagonalProc(oldtype, cdata)
|
||||
DBDiagonalProc(oldtype, dinfo)
|
||||
TileType oldtype;
|
||||
ClientData cdata;
|
||||
DiagInfo *dinfo;
|
||||
{
|
||||
TileType old_n, old_s, old_e, old_w;
|
||||
TileType new_n, new_s, new_e, new_w;
|
||||
TileType newtype;
|
||||
DiagInfo *dinfo = (DiagInfo *)cdata;
|
||||
PaintResultType *resultTbl = dinfo->resultTbl;
|
||||
|
||||
/* Disassemble old and new types into four quadrants, find the */
|
||||
|
||||
Reference in New Issue
Block a user