diff options
| author | Valery Febvre <vfebvre at easter-eggs.com> | 2004-07-30 16:04:18 +0000 |
|---|---|---|
| committer | Valery Febvre <vfebvre at easter-eggs.com> | 2004-07-30 16:04:18 +0000 |
| commit | 386d690c3cc88977826ca2eb312532f5cb2eb44d (patch) | |
| tree | bd24a415411d491274cfbab8620b416357c594a1 | |
| parent | 514f62e39cf9b7ac6baf29fab2da8e8554d3952c (diff) | |
| download | lasso-386d690c3cc88977826ca2eb312532f5cb2eb44d.tar.gz lasso-386d690c3cc88977826ca2eb312532f5cb2eb44d.tar.xz lasso-386d690c3cc88977826ca2eb312532f5cb2eb44d.zip | |
Initial commit
| -rw-r--r-- | HACKING | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/HACKING b/HACKING new file mode 100644 index 00000000..190b04b8 --- /dev/null +++ b/HACKING @@ -0,0 +1,34 @@ +1) Coding style. + - Use explicit "!= NULL", "!= 0", etc. This makes code easier to read and + remove warnings on some platform. Don't forget SPACES before and after + the comparison operator. + Example: + BAD: + if(a) + BAD: + if(a!=NULL) + GOOD: + if(a != NULL) + GOOD: + 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 + saves a lot of time when you need to quickly change something. + Example: + BAD: + if(a != NULL) + message(G_LOG_LEVEL_MESSAGE, "Ko"); + GOOD: + if(a != NULL) { + message(G_LOG_LEVEL_MESSAGE, "Ok"); + } + + - Use round brackets '()' for "return". + Example: + BAD: + return 0; + GOOD: + return(0); + + - Check for memory leaks. |
