|
From: Jim B. <ji...@ch...> - 2010-06-24 08:16:43
|
On 2010-06-24 03:32, John Horigan wrote: > The boost style looks ok, but I can think of some areas where the > existing agg style is better, or at least not worse: 1) boost style > requires class member variables to end in '_', agg begins them with > 'm_' 2) boost style has opening brackets at the end of the line, > never on a new line. Agg uses a new line for opening brackets for > class/struct bodies, names spaces, and function bodies (except for > one-liner functions in header files). > > boost style does not address this issue, but I really like the > following style: if an if, while, for, or switch header cannot fit in > one line and must be wrapped then: 1) curly brackets are required for > the statement body, 2) the opening bracket must start on a new line. I actually take that even further: unless the entire if/for statement fits on a single line then I always use curly brackets (and always put the opening bracket on a new line). I tried the underscore suffix thing for a while but didn't get on with it so I'm back to using "m_" now. - Jim |