Commit 2afbd773b8307447be7445ff3b28ff13255fa337

Sam Lantinga 2013-09-05T07:02:27

Fixed bug 2081 - Add name to SDL_Point structure Dmitry Marakasov Unlike SDL_Rect (typedef struct SDL_Rect {} SDL_Rect), SDL_Point (typedef struct {} SDL_Point) structure is unnamed. This feels inconsistent and makes it impossible to use forward declaration for SDL_Point, having to include whole SDL_rect.h instead.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/include/SDL_rect.h b/include/SDL_rect.h
index c8af7c1..7132e1b 100644
--- a/include/SDL_rect.h
+++ b/include/SDL_rect.h
@@ -44,7 +44,7 @@ extern "C" {
  *
  *  \sa SDL_EnclosePoints
  */
-typedef struct
+typedef struct SDL_Point
 {
     int x;
     int y;