POV-Ray : Newsgroups : povray.off-topic : You lose some... : Re: You lose some... Server Time
6 Sep 2024 21:20:04 EDT (-0400)
  Re: You lose some...  
From: Slime
Date: 4 Oct 2008 18:31:23
Message: <48e7eebb@news.povray.org>
>     for (unsigned int i=0; i<c.size(); i++)
>       if (c[i]) out.append("1"); else out.append("0");

This isn't the cause of your crash, but I recommend not squishing your code 
together like that. Keep each statement on a separate line and use brackets 
around anything that's not a single simple statement:

    for ( unsigned int i = 0; i < c.size(); i++ )
    {
        if ( c[i] )
            out.append( "1" );
        else
            out.append( "0" );
    }

Also put spaces around your operators like "=", "+" and "<". Readable code 
is superior to short code.

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.