Fix shadowing variables

This commit is contained in:
seelabs
2019-08-13 14:26:02 -07:00
parent 014df67fed
commit b9e73b4852
55 changed files with 460 additions and 444 deletions

View File

@@ -537,9 +537,9 @@ public:
// Verify that.
// Get the last line of the log.
std::ifstream log (fullPath.c_str());
std::ifstream logStream (fullPath.c_str());
std::string lastLine;
for (std::string line; std::getline (log, line); )
for (std::string line; std::getline (logStream, line); )
{
if (! line.empty())
lastLine = std::move (line);
@@ -849,9 +849,9 @@ public:
[this] (Json::Value const& currentJson)
{
{
Json::Value const& jobs = currentJson[jss::jobs];
BEAST_EXPECT(jobs.isArray());
BEAST_EXPECT(jobs.size() == 0);
Json::Value const& j = currentJson[jss::jobs];
BEAST_EXPECT(j.isArray());
BEAST_EXPECT(j.size() == 0);
}
Json::Value const& methods = currentJson[jss::methods];
@@ -884,9 +884,9 @@ public:
// Verify that.
// Get the last line of the log.
std::ifstream log (fullPath.c_str());
std::ifstream logStream (fullPath.c_str());
std::string lastLine;
for (std::string line; std::getline (log, line); )
for (std::string line; std::getline (logStream, line); )
{
if (! line.empty())
lastLine = std::move (line);
@@ -1024,9 +1024,9 @@ public:
// Verify that.
// Get the last line of the log.
std::ifstream log (fullPath.c_str());
std::ifstream logStream (fullPath.c_str());
std::string lastLine;
for (std::string line; std::getline (log, line); )
for (std::string line; std::getline (logStream, line); )
{
if (! line.empty())
lastLine = std::move (line);

View File

@@ -32,17 +32,17 @@ public:
{
Throw<std::runtime_error>("Throw test");
}
catch (std::runtime_error const& e)
catch (std::runtime_error const& e1)
{
BEAST_EXPECT(std::string(e.what()) == "Throw test");
BEAST_EXPECT(std::string(e1.what()) == "Throw test");
try
{
Rethrow();
}
catch (std::runtime_error const& e)
catch (std::runtime_error const& e2)
{
BEAST_EXPECT(std::string(e.what()) == "Throw test");
BEAST_EXPECT(std::string(e2.what()) == "Throw test");
}
catch (...)
{