ALL
Do NOT use boolean variable as function parameters
We follow lots of coding styles and coding standards when we do programming, but we may frequently forget one. The forgotten one is that do not use boolean parameter as the function parameters. The reason is it would greatly reduce the readability of the code. Don't believe it?When you read the following code, what does this code mean? widget->repaint(false); Do not repaint? Or what does this mean? After looking at the document, we know that this parameter is whether to repaint immediately, i.e, false to not immediately redraw or true to immediately redraw. The Windows A...
14,886 1 CODING STYLE CODING STANDARD BOOLEAN FUNCTION PARAMETER METHOD PARAMETER