[AD] al_create_native_file_dialog |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: "Coordination of admins/developers of the game programming library Allegro" <alleg-developers@xxxxxxxxxx>
- Subject: [AD] al_create_native_file_dialog
- From: Matthew Leverton <meffer@xxxxxxxxxx>
- Date: Thu, 20 Jan 2011 21:37:05 -0600
Is there a reason why al_create_native_file_dialog() takes an
ALLEGRO_PATH instead of a const char*? I didn't go through the entire
API, but that's the only place I can think of that works that way.
I think generally speaking, every API call*** should take a const
char* as a source parameter, simply because it's annoying to have to
create and destroy a path when you're working with c-strings. I don't
mind if a function returns an ALLEGRO_PATH.
[*** The obvious exception being the ALLEGRO_PATH routines themselves.]
On a related note, is the second parameter to al_path_cstr() ever
_really_ useful? It would be less of a mouthful to use if it was only
one parameter. There could always be a second function
al_path_delim_cstr() if it was useful.
i.e., al_path_cstr(path) could be implemented as
al_path_delim_cstr(path, ALLEGRO_NATIVE_PATH_SEP);
Not that I really care much... just a minor annoyance.
--
Matthew Leverton