Skip to content
baldurk edited this page Nov 23, 2014 · 2 revisions

I'm not particularly fussed about coding style honestly. I'll be the first to admit that I'm not particularly consistent when it comes to the code I've written, and I tend to be pretty tolerant about most of the common variations in personal preference or style as long as they are readable (most are, and unreadable code tends to come from things other than brace placement or naming conventions).

Try to match the code that you're modifying if you're just making a small change, and don't mix and match wildly different styles in the same place. Don't go reformatting tons of code when you're only changing one section, but if you're changing a section no-one will complain if it doesn't precisely absolutely match what it was before.

I reserve the right to ask for some reformatting if something bugs me in a pull request :).

A few notes:

  • Put OS-specific functionality in the relevant OS implementations. Most code should be agnostic.
  • Strings are always UTF-8, everywhere, unless they are wide strings which are only used for windows compatibility. Plain char* byte strings should be used everywhere in non-OS specific code, and are always treated as UTF-8 (never assume a string will be plain ASCII).

Clone this wiki locally