CoreBitcoin icon indicating copy to clipboard operation
CoreBitcoin copied to clipboard

Reformat the code to put opening curly brace on the same line as method name

Open oleganza opened this issue 9 years ago • 4 comments

This will makes it consistent with Apple Obj-C and Swift style guide and consistent with blocks/closures syntax. This should apply to methods, blocks and conditionals.

Originally I was placing opening brace on the new line to have more whitespace around the code to make it easier to read. However, using Meslo font with increased line-height proved to be more efficient and now we can put all braces back on the same line as the related expression.

Before:

if (foo)
{
    bar;
}

After:

if (foo) {
    bar;
}

oleganza avatar Apr 20 '15 13:04 oleganza

I can take this on. I was looking for a simple way to get into the code here.

joelklabo avatar Dec 15 '15 19:12 joelklabo

@joelklabo thanks!

oleganza avatar Dec 15 '15 20:12 oleganza

bump

joelklabo avatar Dec 17 '15 21:12 joelklabo

This was done BTW.

https://github.com/oleganza/CoreBitcoin/commit/58ffed3b9fe4d017136e4921731648a154f3a0bf

joelklabo avatar Jan 24 '16 21:01 joelklabo