[Kde-games-devel] Indentation of KGoldrunner re-done

Ian Wadham ianw2 at optusnet.com.au
Fri Jan 25 07:27:01 CET 2008


Hello everybody,

I have just done a major re-indentation of all *.h and *.cpp
files in KGoldrunner, revision 766061.  So if you are planning
to make any changes to KGoldrunner code, please do SVN
update first.  The new code has no differences to the old,
using diff -wb, but I did find one bug even after that, so
please keep an eye out for any strange occurrences and let
me know, e.g. by private email, rather than a bug report.

The new indentation is in steps of four spaces, with NO tabs,
which I understand is the KDE preference.  Tabs can still occur
after the first non-whitespace character in a line, e.g. before
comments at the end of a line - and this is intentional.  Other
little adjustments are:

   - "{" on same line as "if", "while", "switch" or "for", if possible,
   - lines limited to 80 chars, if possible (changes not finished yet),
   - no "cuddled else" (i.e. not like "} else {"): I prefer "}\n    else {",
   - "fn (abc)" is preferred, i.e. space after "fn" and none after "(",
   - functions with no arguments preferred as "fn()", with no space,
   - no spaces either side of "::", e.g. "KGrGame::showHint()".

Here's hoping you will all find the new code easier to read.  The
old code was really a mess.

All the best, Ian W.



    


More information about the kde-games-devel mailing list