Re: [AD] utf16, file functions |
[ 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: Re: [AD] utf16, file functions
- From: Evert Glebbeek <eglebbk@xxxxxxxxxx>
- Date: Wed, 18 Mar 2009 10:37:42 -0700
On 18 Mar 2009, at 10:20 , Elias Pschernig wrote:
Using size_t is a bit annoying as you can't use "int" loop variables
without triggering a warning about comparing signed and unsigned - but
if we want to change that it should be throughout the API.
size_t is appropriate though.
Technically, it may be unsafe to use a plain int in a loop with the
upper limit determined by a size_t variable, since there is no
guarentee that an int can hold the proper range of values (or even an
unsigned int). These are probably corner cases though.
I think I would use an unsigned int if I wanted to silence the warning
and use a size_t as the loop variable if I was really worried about
the range.
Evert