diff options
| author | Valery Febvre <vfebvre at easter-eggs.com> | 2004-08-04 21:24:48 +0000 |
|---|---|---|
| committer | Valery Febvre <vfebvre at easter-eggs.com> | 2004-08-04 21:24:48 +0000 |
| commit | 6483c9584b1bf5a468276250805bedc1ee1edd3d (patch) | |
| tree | 9819677837dad23d67e4330b6a9f8acea6b20e1e /HACKING | |
| parent | 6f48cba5e81959bf43bf6a0d668f9bda1e4545b8 (diff) | |
| download | lasso-6483c9584b1bf5a468276250805bedc1ee1edd3d.tar.gz lasso-6483c9584b1bf5a468276250805bedc1ee1edd3d.tar.xz lasso-6483c9584b1bf5a468276250805bedc1ee1edd3d.zip | |
update
Diffstat (limited to 'HACKING')
| -rw-r--r-- | HACKING | 30 |
1 files changed, 23 insertions, 7 deletions
@@ -8,13 +8,13 @@ Coding Style Examples: BAD: - ``if(a)`` + ``if (a)`` BAD: - ``if(a!=NULL)`` + ``if (a!=NULL)`` GOOD: - ``if(a != NULL)`` + ``if (a != NULL)`` GOOD: - ``if(a != 0)`` + ``if (a != 0)`` - Put figure brackets ``{}`` even if you have only one operator in ``if``, ``for``, etc. This also makes code easier to read and @@ -24,12 +24,29 @@ Coding Style BAD: .. line-block:: - if(a != NULL) + if (a != NULL) message(G_LOG_LEVEL_MESSAGE, "Ko"); GOOD: .. line-block:: - if(a != NULL) { + if (a != NULL) { + message(G_LOG_LEVEL_MESSAGE, "Ok"); + } + +- Put SPACES before the opening round bracket and after the closing round + bracket. One more time, it improves the readability of the code. + + Examples: + BAD: + .. line-block:: + + if(a != NULL){ + message(G_LOG_LEVEL_MESSAGE, "Ko"); + } + GOOD: + .. line-block:: + + if (a != NULL) { message(G_LOG_LEVEL_MESSAGE, "Ok"); } @@ -42,4 +59,3 @@ Coding Style ``return(0);`` - Check for memory leaks. - |
