From: Jorrit T. <jor...@gm...> - 2008-02-13 14:47:21
|
So you propose to change the documentation instead? Greetings, On Feb 13, 2008 3:45 PM, res <re...@gm...> wrote: > On 13.02.2008 15:34, Jorrit Tyberghein wrote: > > The documentation of csString::Clear() states: > > > > /** > > * Clear the string (so that it contains only a null terminator). > > */ > > > > However in the implementation it will not do that if the string happens > > to be NULL (null pointer). In that case nothing happens. > > > > So the documentation doesn't reflect the actual implementation. Either > > we fix the documentation or else the implementation. I would think that > > it would be better to fix the implementation but that's a change of > > behaviour. > > The reason is that Empty() ultimatively uses Truncate(0), but "if the > string had already represented a null-pointer, in which case it will > continue to represent a null-pointer after truncation." > > -f.r. > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Crystal-develop mailing list > Cry...@li... > https://lists.sourceforge.net/lists/listinfo/crystal-develop > > -- Project Manager of Crystal Space (http://www.crystalspace3d.org) and CEL (http://cel.crystalspace3d.org) Support Crystal Space. Donate at https://sourceforge.net/donate/index.php?group_id=649 Visit my town at http://waldir.myminicity.com/ |