leondutoit / sparsehash

Automatically exported from code.google.com/p/sparsehash
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

size parameter in sparsetable constructor shadows member method #19

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. compile with GCC option -Wshadow

What is the expected output? What do you see instead?
This produces a warning that the constructor parameter to
sparsetable::sparsetable (1140) shadows a member, namely the method size().
This causes sadness for those who would like to use this warning.

What version of the product are you using? On what operating system?
0.94.1 on Ubuntu Linux. 

Please provide any additional information below.
GCC 4.1.2

Original issue reported on code.google.com by ano...@gmail.com on 20 Dec 2007 at 2:45

GoogleCodeExporter commented 9 years ago
Fair enough.  For the next release, we'll rename the variable and also add 
-Wshadow
to the Makefile so we'll notice if it happens again.

Original comment by csilv...@gmail.com on 20 Dec 2007 at 3:55

GoogleCodeExporter commented 9 years ago
Should be fixed in sparsehash 1.1

Original comment by csilv...@gmail.com on 13 Feb 2008 at 12:38