Hi,

that's a good idea but I see some problems.

1) you have not checked where this value is used and what is the meaning 
of -1, thus you have broken the feature. (This is the biggest problem 
from my point of view)

2) I see from /usr/src/limits.h : "ISO C99 Standard: 7.10/5.2.4.2.1 
Sizes of integer types <limits.h>".
It means that your code is conforming to C99 standard which not part of 
C++ ones (C++ has diverged from C before). Thus, it is not portable 
(same issue that NAN - bug #11713 - https://gna.org/bugs/?11713)
Instead, we can probably use std::numeric_limits< unsigned int >::max()
(see http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01233.html)

Regards,

Matthieu

Yoann a écrit :
> Author: plorf
> Date: Wed May 28 21:42:27 2008
> New Revision: 4542
>
> URL: http://svn.gna.org/viewcvs/wormux?rev=4542&view=rev
> Log:
> particles : correct a compilation error : assign -1 to an unsigned int, i 
> have add <limit> and use the library max unsigned int instead. It should be 
> exactly the same values, but better i hope
>
> Modified:
>     trunk/src/particles/polecat_fart.cpp
>
>
> _______________________________________________
> Wormux-cvs mailing list
> [EMAIL PROTECTED]
> https://mail.gna.org/listinfo/wormux-cvs
>
>
>   


_______________________________________________
Wormux-dev mailing list
Wormux-dev@gna.org
https://mail.gna.org/listinfo/wormux-dev

Répondre à