[SDL] SDL_Layer
Ulrich Eckhardt
doomster at knuut.de
Tue Jun 17 22:27:29 PDT 2008
On Sunday 15 June 2008 21:23:01 julien CLEMENT wrote:
> http://code.google.com/p/sdl-layer/downloads/list
>
> (Choose the SDL_Layer.h file, not the other one)
>
> I'm looking forward to receiving your precious advices and remarks.
Okay, here we go...
* All names with two consecutive underscores or beginning with an underscore
followed by a capital letter are reserved and you must not use them unless
you are implementing C (or C++). _SDL_LayeredDisplay_h_ and
_SDL_LayeredDisplay_ therefore make this code already invalid C, and that
without the underscores adding anything IMHO.
* There is no reason that a struct tag can't have the same name as a
typename, so "typedef struct _SDL_LayeredDisplay_ SDL_LayeredDisplay;" could
as well be "typedef struct SDL_LayeredDisplay SDL_LayeredDisplay;" or you
could just as well spell out the 'struct' in the header at least and just
abbreviate it in the implementation.
* Use of SDL_ names further invades into the SDL namespace, which poses a
risk for collisions. Unless you intend to make this part of SDL proper, I
would suggest a different prefix.
* "there're" - typo, should be "they're" or "they are".
* "Useful only when the display size is bigger than the display size." -
bigger than itself?
Uli
More information about the SDL
mailing list