Re: [AD] al_get_path

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Thomas Fjellstrom wrote:

If we want to go all out, lets make all functions that take a path, take an ALLEGRO_PATH.


You mean so instead of:

bitmap = al_load_bitmap(imagename);

I would have to use:

ALLEGRO_PATH *path = al_path_create(imagename);
bitmap = al_load_bitmap(path);
al_path_free(path);

I'd say it's a different issue. The reason I want to change al_path_change is the example in my previous post. You don't need to deal with pre-allocated buffers and maximum sizes and you save some code. And I don't see many use-cases where you could use the path returned by al_path_create without converting it to an ALLEGRO_PATH (the only one I can come up with is listing the directory contents, in fact... and it seems unlikely someone would want to do it, and trivial even if it's an ALLEGRO_PATH).

--
Elias Pschernig <elias@xxxxxxxxxx>




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/