On Sun, 2011-01-30 at 12:39 -0500, Ryan Leavengood wrote: > On Sun, Jan 30, 2011 at 12:26 PM, Alexander von Gluck > <kallisti5@xxxxxxxxxxx> wrote: > > > > Here is my confusion, every header I look at is different. Here is the > > style guideline, one of your headers, and one of my headers compared... > > > > http://i53.tinypic.com/5o9utj.png > > Not all existing code, no matter who wrote it, is guaranteed to follow > the coding guidelines. So it isn't really an excuse to point to > someone else's code which doesn't follow the guidelines. I know, and I knew pulling a random header is unfair. I just wanted to illustrate a point. I think the code style document on the website needs cleanup and reformatting. I also know most of what Axel is point out are valid problems I need to work on. > Things I can see in your header that need fixing are the addition of a > header guard, two spaces between the include and the class > declaration Can do. > not indenting public and protected, I indented those because that is what those headers show, I normally do not and did think it was weird. * will fix > moving the protected > section below public I saw that in the image and knew someone would call me on it :) * will fix. > and indenting more to the guidelines (a tab and > then the place were virtual and other method modifers would be, then a > tab or more and the return type, then several tabs and the method name > to line all those up.) That is what my current example in the image is pretty close to (and what I normally do) * will fix > > > Thoughts? I *do* really want to make sure my header style is correct > > and consistent with the projects... I just can't find a good guide on > > it. > > The coding guidelines should always have preference. As long as you > code to them no one can complain. And if someone does complain then > clearly the guidelines need an addition. > > And try not to feel persecuted: most of us commit style violations > occasionally and you'll get the hang of it soon. I know, these strict guidelines have always been in place for as long as I can remember (and I *do* think they are positive). Just gets *really* frustrating at times :) Thanks! -- Alex