[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Indent convention for class methods in .h files
From: |
Rik |
Subject: |
Indent convention for class methods in .h files |
Date: |
Mon, 14 Oct 2013 11:10:35 -0700 |
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.
--Rik
- Indent convention for class methods in .h files,
Rik <=