Rockbox.org home
releases
current build
extras FAQ
manual
wiki
docs index mailing lists
IRC
forums bugs
patches



Rockbox mail archive

Subject: Re: Coding conventions
From: Robert Hak (rhak_at_ramapo.edu)
Date: 2002-08-29


Directly from the Contributing file:
http://rockbox.haxx.se/docs/contributing.html

"When changing code, follow the code style of the file you are editing.
 When writing new files, you may use the brace placement style of your
 choice."

If your format has been changed, you can check with the Code Police ;)

(aka: Zagor :) )

Hope that helps..

/Adi

On Thu, 29 Aug 2002, perterm wrote:

Robert Hak wrote:
> avoid putting the if clause's on the same
> line:
>
> if(true) i++;
>
> should be
>
> if(true)
> i++;

Does this convention cover how braces should be used, too?
I usually would write

if (true) {
     i++;
}

But I notice that code I supplied was altered -> someone doesn't seem to
like single lines in braces.

Phil

   ===+===+===+===+===+===+===+===+===+===+===+===
                    Robert E. Hak
            http://phobos.ramapo.edu/~rhak

       Rockbox: The Archos Firmware Replacement!
         FAQ: http://rockbox.haxx.se/docs/FAQ
   ===+===+===+===+===+===+===+===+===+===+===+===

"God is obsolete."
        - !!!SRINI : http://www.unamerican.com



Page was last modified "Mar 9 2008" The Rockbox Crew