[haiku-commits] Re: haiku: hrev54095 - src/add-ons/kernel/file_systems/xfs

  • From: Rene Gollent <anevilyak@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 27 Apr 2020 09:44:57 -0400

On Mon, 27 Apr 2020 at 09:33, Shubham Bhagat
<dmarc-noreply@xxxxxxxxxxxxx> wrote:


Hi!
Sorry about that :/ ..If it's OK to ask, can you tell me which part of that 
snippet is not okay? I will fix it. I am trying to get more familiar with the 
coding guidelines every time I'm writing something.

[...]
+int BPlusTree::MaxRecords(bool leaf){

For functions, return type goes on its own line, and beginning curly
brace on a separate line as well, i.e.

int
BPlusTree::MaxRecords(bool leaf)
{

Also note, that generally for inline curly braces, i.e. on if
conditions, there should be a space between closing paren and brace,
i.e. if (condition) {

Ideally, you'll want to look through the coding guidelines [1], as
they have many examples.

Regards,

Rene

[1] https://www.haiku-os.org/development/coding-guidelines

Other related posts: