Fixing variable shadowing warnings in the torrent-file unit tests
Change-Id: I10320fc02764975e23263f9d5dc4b8b7c70ba86a
diff --git a/tests/unit-tests/torrent-file.t.cpp b/tests/unit-tests/torrent-file.t.cpp
index 955d54c..c946b6c 100644
--- a/tests/unit-tests/torrent-file.t.cpp
+++ b/tests/unit-tests/torrent-file.t.cpp
@@ -368,15 +368,15 @@
auto manifestPairs2 = torrentFilePair2.second;
// Check that generate has not returned any data packets unless otherwise specified
- for (auto i = manifestPairs1.begin(); i != manifestPairs1.end(); ++i) {
- BOOST_CHECK_EQUAL((*i).second.size(), 0);
+ for (auto j = manifestPairs1.begin(); j != manifestPairs1.end(); ++j) {
+ BOOST_CHECK_EQUAL((*j).second.size(), 0);
}
Name directoryPathName(directoryPath);
fs::recursive_directory_iterator directoryPtr(fs::system_complete(directoryPath).string());
int numberOfDirectoryFiles = 0;
- for (fs::recursive_directory_iterator i = directoryPtr;
- i != fs::recursive_directory_iterator(); ++i) {
+ for (fs::recursive_directory_iterator j = directoryPtr;
+ j != fs::recursive_directory_iterator(); ++j) {
numberOfDirectoryFiles++;
}
// Verify the basic attributes of the torrent-file
@@ -405,8 +405,8 @@
}
std::vector<uint8_t> dataBytes;
- for (auto i = manifestPairs2.begin() ; i != manifestPairs2.end(); ++i) {
- for (auto d : (*i).second) {
+ for (auto j = manifestPairs2.begin() ; j != manifestPairs2.end(); ++j) {
+ for (auto d : (*j).second) {
auto content = d.getContent();
dataBytes.insert(dataBytes.end(), content.value_begin(), content.value_end());
}
@@ -414,10 +414,10 @@
// load the contents of the directory files from disk
std::vector<uint8_t> directoryFilesBytes;
fs::recursive_directory_iterator directoryPtr2(fs::system_complete(directoryPath).string());
- for (fs::recursive_directory_iterator i = directoryPtr2;
- i != fs::recursive_directory_iterator();
- ++i) {
- fs::ifstream is((*i), fs::ifstream::binary | fs::ifstream::in);
+ for (fs::recursive_directory_iterator j = directoryPtr2;
+ j != fs::recursive_directory_iterator();
+ ++j) {
+ fs::ifstream is((*j), fs::ifstream::binary | fs::ifstream::in);
is >> std::noskipws;
std::istream_iterator<uint8_t> start(is), end;
std::vector<uint8_t> fileBytes(start, end);