Places/Coding Style: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 1: Line 1:
As a general rule we follow conventions reported in the global coding style page: https://developer.mozilla.org/En/Developer_Guide/Coding_Style  
As a general rule we follow conventions reported in the [https://developer.mozilla.org/En/Developer_Guide/Coding_Style Global Coding Style page].<br>


With some differences:  
With some differences:  
Line 51: Line 51:
}
}
</pre>  
</pre>  
Notice that input params are always starting with "a" letter, while output params should be prefixed with and underscore.
Notice that input params are always starting with "a" letter, while output params should be prefixed with an underscore.  


Constructors params are inited like this (notice order of inited params should be the same as they are defined in the class definition, otherwise GCC will warn)<br>  
Constructors params are inited like this (notice order of inited params should be the same as they are defined in the class definition, otherwise GCC will warn)<br>  
Line 78: Line 78:
<br>  
<br>  


If both Coding style guide and this page cannot answer your question regarding code style, try checking [http://mxr.mozilla.org/mozilla-central/source/storage/style.txt Storage code style document], we don't follow all Storage code style conventions, but it contains some interesting idea.<br>
If both [https://developer.mozilla.org/En/Developer_Guide/Coding_Style  Globarl Coding Style page] and this page cannot answer your question regarding code style, try checking [http://mxr.mozilla.org/mozilla-central/source/storage/style.txt Storage code style document], we don't follow all Storage code style conventions, but it contains some interesting idea.<br>
Confirmed users
595

edits

Navigation menu