mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 12:52:46 +00:00
[qwaq] Give up on pass-by-reference for now
It's too much hassle to ensure the passed variable isn't a local. It's just not worth the grief right now.
This commit is contained in:
parent
db39f7ed3e
commit
3e9977c272
2 changed files with 2 additions and 3 deletions
|
@ -21,8 +21,7 @@ typedef struct Rect_s {
|
||||||
@extern Point makePoint (int x, int y);
|
@extern Point makePoint (int x, int y);
|
||||||
@extern Extent makeExtent (int width, int height);
|
@extern Extent makeExtent (int width, int height);
|
||||||
@extern Extent mergeExtents (Extent a, Extent b);
|
@extern Extent mergeExtents (Extent a, Extent b);
|
||||||
//XXX will not work if point or rect point to a local variabl
|
@extern int rectContainsPoint (Rect rect, Point point);
|
||||||
@extern int rectContainsPoint (Rect *rect, Point *point);
|
|
||||||
@extern Rect clipRect (Rect clipRect, Rect rect);
|
@extern Rect clipRect (Rect clipRect, Rect rect);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ Extent mergeExtents (Extent a, Extent b)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
rectContainsPoint (Rect *rect, Point *point)
|
rectContainsPoint (Rect rect, Point point)
|
||||||
{
|
{
|
||||||
return ((point.x >= rect.offset.x
|
return ((point.x >= rect.offset.x
|
||||||
&& point.x < rect.offset.x + rect.extent.width)
|
&& point.x < rect.offset.x + rect.extent.width)
|
||||||
|
|
Loading…
Reference in a new issue