mirror of
https://github.com/USCiLab/cereal.git
synced 2025-10-18 01:45:52 +02:00
Compiling with clang and gcc with -Wshadow
See issue #17 Somewhere along the way we've also broken our ability to compile with GCC 4.7.3. We'll have to decide if we care about supporting 4.7.3 or not. The changes that break this are: -there is no emplace in std::map (or related) in 4.7.3 -there are some enable_ifs in rapidjson's writer.h that are always false (which is fine), but GCC 4.7.3 doesn't like this
This commit is contained in:
@@ -344,13 +344,13 @@ int main()
|
||||
const bool randomize = false;
|
||||
|
||||
//########################################
|
||||
auto vectorDoubleTest = [&](size_t s, bool randomize)
|
||||
auto vectorDoubleTest = [&](size_t s, bool randomize_)
|
||||
{
|
||||
std::ostringstream name;
|
||||
name << "Vector(double) size " << s;
|
||||
|
||||
std::vector<double> data(s);
|
||||
if(randomize)
|
||||
if(randomize_)
|
||||
for( auto & d : data )
|
||||
d = rngD();
|
||||
|
||||
@@ -363,13 +363,13 @@ int main()
|
||||
vectorDoubleTest(1024*1024, randomize); // 8MB
|
||||
|
||||
//########################################
|
||||
auto vectorCharTest = [&](size_t s, bool randomize)
|
||||
auto vectorCharTest = [&](size_t s, bool randomize_)
|
||||
{
|
||||
std::ostringstream name;
|
||||
name << "Vector(uint8_t) size " << s;
|
||||
|
||||
std::vector<uint8_t> data(s);
|
||||
if(randomize)
|
||||
if(randomize_)
|
||||
for( auto & d : data )
|
||||
d = rngC();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user