The rectangle argument to SDL_SetClipRect is really const
authorSam Lantinga <slouken@libsdl.org>
Tue, 31 Jul 2001 05:36:10 +0000
changeset 13014af14ff7c19
parent 129 db0bee1c5845
child 131 5d08b230932e
The rectangle argument to SDL_SetClipRect is really const
include/SDL_video.h
src/video/SDL_surface.c
     1.1 --- a/include/SDL_video.h	Tue Jul 31 04:06:56 2001 +0000
     1.2 +++ b/include/SDL_video.h	Tue Jul 31 05:36:10 2001 +0000
     1.3 @@ -593,7 +593,7 @@
     1.4   * Note that blits are automatically clipped to the edges of the source
     1.5   * and destination surfaces.
     1.6   */
     1.7 -extern DECLSPEC SDL_bool SDL_SetClipRect(SDL_Surface *surface, SDL_Rect *rect);
     1.8 +extern DECLSPEC SDL_bool SDL_SetClipRect(SDL_Surface *surface, const SDL_Rect *rect);
     1.9  
    1.10  /*
    1.11   * Gets the clipping rectangle for the destination surface in a blit.
     2.1 --- a/src/video/SDL_surface.c	Tue Jul 31 04:06:56 2001 +0000
     2.2 +++ b/src/video/SDL_surface.c	Tue Jul 31 05:36:10 2001 +0000
     2.3 @@ -275,7 +275,7 @@
     2.4   * return true if the rectangles intersect, false otherwise
     2.5   */
     2.6  static __inline__
     2.7 -SDL_bool SDL_IntersectRect(SDL_Rect *A, SDL_Rect *B, SDL_Rect *intersection)
     2.8 +SDL_bool SDL_IntersectRect(const SDL_Rect *A, const SDL_Rect *B, SDL_Rect *intersection)
     2.9  {
    2.10  	int Amin, Amax, Bmin, Bmax;
    2.11  
    2.12 @@ -308,7 +308,7 @@
    2.13  /*
    2.14   * Set the clipping rectangle for a blittable surface
    2.15   */
    2.16 -SDL_bool SDL_SetClipRect(SDL_Surface *surface, SDL_Rect *rect)
    2.17 +SDL_bool SDL_SetClipRect(SDL_Surface *surface, const SDL_Rect *rect)
    2.18  {
    2.19  	SDL_Rect full_rect;
    2.20