|
From: | John W. Eaton |
Subject: | Re: Indent convention for class methods in .h files |
Date: | Mon, 14 Oct 2013 15:19:08 -0400 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12 |
On 10/14/2013 02:10 PM, Rik wrote:
10/14/13 All, What is the indentation convention for class methods in .h files? Taking a representative sample, liboctave/array/dMatrix.h, I find two different rules. Rule #1 : Indent bodies like if blocks Matrix& operator = (const Matrix& a) { MArray<double>::operator = (a); return *this; } Rule #2 : Don't indent bodies like function blocks void resize (octave_idx_type nr, octave_idx_type nc, double rfv = 0) { MArray<double>::resize (dim_vector (nr, nc), rfv); } For what it's worth, the class methods defined in the corresponding dMatrix.cc use rule #2.
I think it should be #2. As I recall, older versions of Emacs did #1. When I work on files now, I tend to change the functions that I'm working on, but I don't just change everything because it would create problems for merging patches from people who are working with released versions. But if you want to clean up more of this, now is probably a good time to do it. jwe
[Prev in Thread] | Current Thread | [Next in Thread] |