Skip to content

Commit 5e796e9

Browse files
laanwjPastaPastaPasta
authored andcommitted
Merge bitcoin#10381: Shadowing warnings are not enabled by default, update doc accordingly
f203ecc Shadowing is not enabled by default, update doc accordingly. (Pavel Janík) Tree-SHA512: a7170827caa9d35457356808445ef2387fd2edde72fb76c6241cfd5decad218558b307d223e86bb66041576b638f90f6efa8a46ea6208d43da275a993617c997
1 parent 32c0e0f commit 5e796e9

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

doc/developer-notes.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -346,10 +346,9 @@ Strings and formatting
346346
Variable names
347347
--------------
348348

349-
The shadowing warning (`-Wshadow`) is enabled by default. It prevents issues rising
350-
from using a different variable with the same name.
351-
352-
Please name variables so that their names do not shadow variables defined in the source code.
349+
Although the shadowing warning (`-Wshadow`) is not enabled by default (it prevents issues rising
350+
from using a different variable with the same name),
351+
please name variables so that their names do not shadow variables defined in the source code.
353352

354353
E.g. in member initializers, prepend `_` to the argument name shadowing the
355354
member name:

0 commit comments

Comments
 (0)