Cpp Coding Standards/FIMPL

From Apache OpenOffice Wiki
Jump to: navigation, search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Function Implementation (FIMPL) - Summary

Issues when implementing function bodies.

Short Functions (Short)

Make functions short.

Consider replacing comments by function calls. Consider to flatten deep nested control structures by moving parts of them in extra functions. Consider moving complicated loop bodies into extra functions. Put repeated code snippets in an extra function. -> Details

No Magic Numbers (MagNum)

Don't use unnamed constants in your code. Give them a descriptive name. The definition is prefered in the headers -> Details

Default in switch Statements (DefSwitch)

Don't just drop out of a switch statement, always provide a default case or a comment, why it is not needed.
Comment missing breaks.
-> Details

No Catch All (Catch)

Avoid catch(...). -> Details


Related Rules


Personal tools