Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Indentation of "public" and "private" visibility modifiers [closed]

Tags:

I usually indent the public: and private: access specifiers like this:

class Foo() {     private:      void Bar1() {}      public:      void Bar2() {} } 

Xcode doesn't seem to like this, however, so I feel like I'm doing something incorrectly. What is considered common practice for indenting private: and public:?

like image 328
Maxpm Avatar asked Feb 10 '11 17:02

Maxpm


1 Answers

"Religious" question :-) You will get many different answers I think.

I say:
Which ever you like as long as you are consistent.

like image 115
Gregor Brandt Avatar answered Sep 19 '22 14:09

Gregor Brandt