mirror of
https://github.com/pocoproject/poco.git
synced 2025-03-05 03:37:28 +01:00
Revert "GH #1050 Zip: fix gcc -Wshadow warnings"
This commit is contained in:
parent
09036152b8
commit
289b05c8b3
@ -68,17 +68,17 @@ inline CppUnitException::CppUnitException(const CppUnitException& other): except
|
||||
}
|
||||
|
||||
|
||||
inline CppUnitException::CppUnitException (const std::string& message, long line, const std::string& rFileName): _message(message), _lineNumber(line), _data1lineNumber(CPPUNIT_UNKNOWNLINENUMBER), _data2lineNumber(CPPUNIT_UNKNOWNLINENUMBER), _fileName(rFileName)
|
||||
inline CppUnitException::CppUnitException (const std::string& message, long lineNumber, const std::string& fileName): _message(message), _lineNumber(lineNumber), _data1lineNumber(CPPUNIT_UNKNOWNLINENUMBER), _data2lineNumber(CPPUNIT_UNKNOWNLINENUMBER), _fileName(fileName)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
inline CppUnitException::CppUnitException (const std::string& message, long line, long data1lineNumber, const std::string& rFileName): _message(message), _lineNumber(line), _data1lineNumber(data1lineNumber), _data2lineNumber(CPPUNIT_UNKNOWNLINENUMBER), _fileName(rFileName)
|
||||
inline CppUnitException::CppUnitException (const std::string& message, long lineNumber, long data1lineNumber, const std::string& fileName): _message(message), _lineNumber(lineNumber), _data1lineNumber(data1lineNumber), _data2lineNumber(CPPUNIT_UNKNOWNLINENUMBER), _fileName(fileName)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
inline CppUnitException::CppUnitException (const std::string& message, long line, long data1lineNumber, long data2lineNumber, const std::string& rFileName): _message(message), _lineNumber(line), _data1lineNumber(data1lineNumber), _data2lineNumber(data2lineNumber), _fileName(rFileName)
|
||||
inline CppUnitException::CppUnitException (const std::string& message, long lineNumber, long data1lineNumber, long data2lineNumber, const std::string& fileName): _message(message), _lineNumber(lineNumber), _data1lineNumber(data1lineNumber), _data2lineNumber(data2lineNumber), _fileName(fileName)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -56,10 +56,10 @@ class TestCaller: public TestCase
|
||||
typedef void (Fixture::*TestMethod)();
|
||||
|
||||
public:
|
||||
TestCaller(const std::string& rName, TestMethod test):
|
||||
TestCase(rName),
|
||||
TestCaller(const std::string& name, TestMethod test):
|
||||
TestCase(name),
|
||||
_test(test),
|
||||
_fixture(new Fixture(rName))
|
||||
_fixture(new Fixture(name))
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -173,7 +173,7 @@ protected:
|
||||
|
||||
|
||||
// Constructs a test case
|
||||
inline TestCase::TestCase(const std::string& rName): _name (rName)
|
||||
inline TestCase::TestCase(const std::string& name): _name (name)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,7 @@ protected:
|
||||
|
||||
|
||||
// Constructs a TestFailure with the given test and exception.
|
||||
inline TestFailure::TestFailure(Test* pFailedTest, CppUnitException* pThrownException): _failedTest(pFailedTest), _thrownException(pThrownException)
|
||||
inline TestFailure::TestFailure(Test* failedTest, CppUnitException* thrownException): _failedTest(failedTest), _thrownException(thrownException)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -155,8 +155,8 @@ void Compress::addFileRaw(std::istream& in, const ZipLocalFileHeader& h, const P
|
||||
if(hdr.hasExtraField()) // Update sizes in header extension.
|
||||
hdr.setZip64Data();
|
||||
_out.seekp(hdr.getStartPos(), std::ios_base::beg);
|
||||
std::string headerString = hdr.createHeader();
|
||||
_out.write(headerString.c_str(), static_cast<std::streamsize>(headerString.size()));
|
||||
std::string header = hdr.createHeader();
|
||||
_out.write(header.c_str(), static_cast<std::streamsize>(header.size()));
|
||||
_out.seekp(0, std::ios_base::end);
|
||||
}
|
||||
|
||||
@ -273,8 +273,8 @@ void Compress::addRecursive(const Poco::Path& entry, ZipCommon::CompressionMetho
|
||||
{
|
||||
Poco::Path realFile(entry, *it);
|
||||
Poco::Path renamedFile(aName, *it);
|
||||
Poco::File file(realFile);
|
||||
if (file.isDirectory())
|
||||
Poco::File aFile(realFile);
|
||||
if (aFile.isDirectory())
|
||||
{
|
||||
realFile.makeDirectory();
|
||||
renamedFile.makeDirectory();
|
||||
|
@ -31,7 +31,7 @@ const char ZipLocalFileHeader::HEADER[ZipCommon::HEADER_SIZE] = {'\x50', '\x4b',
|
||||
|
||||
|
||||
ZipLocalFileHeader::ZipLocalFileHeader(const Poco::Path& fileName,
|
||||
const Poco::DateTime& lastModified,
|
||||
const Poco::DateTime& lastModifiedAt,
|
||||
ZipCommon::CompressionMethod cm,
|
||||
ZipCommon::CompressionLevel cl,
|
||||
bool forceZip64):
|
||||
@ -51,7 +51,7 @@ ZipLocalFileHeader::ZipLocalFileHeader(const Poco::Path& fileName,
|
||||
setHostSystem(ZipCommon::HS_FAT);
|
||||
setEncryption(false);
|
||||
setExtraFieldSize(0);
|
||||
setLastModifiedAt(lastModified);
|
||||
setLastModifiedAt(lastModifiedAt);
|
||||
init(fileName, cm, cl);
|
||||
}
|
||||
|
||||
@ -186,12 +186,12 @@ bool ZipLocalFileHeader::searchCRCAndSizesAfterData() const
|
||||
}
|
||||
|
||||
|
||||
void ZipLocalFileHeader::setFileName(const std::string& fileName, bool directory)
|
||||
void ZipLocalFileHeader::setFileName(const std::string& fileName, bool isDirectory)
|
||||
{
|
||||
poco_assert (!fileName.empty());
|
||||
Poco::Path aPath(fileName);
|
||||
|
||||
if (directory)
|
||||
if (isDirectory)
|
||||
{
|
||||
aPath.makeDirectory();
|
||||
setCRC(0);
|
||||
@ -207,7 +207,7 @@ void ZipLocalFileHeader::setFileName(const std::string& fileName, bool directory
|
||||
_fileName = aPath.toString(Poco::Path::PATH_UNIX);
|
||||
if (_fileName[0] == '/')
|
||||
_fileName = _fileName.substr(1);
|
||||
if (directory)
|
||||
if (isDirectory)
|
||||
{
|
||||
poco_assert_dbg (_fileName[_fileName.size()-1] == '/');
|
||||
}
|
||||
|
@ -28,7 +28,7 @@
|
||||
using namespace Poco::Zip;
|
||||
|
||||
|
||||
CompressTest::CompressTest(const std::string& rName): CppUnit::TestCase(rName)
|
||||
CompressTest::CompressTest(const std::string& name): CppUnit::TestCase(name)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
using namespace Poco::Zip;
|
||||
|
||||
|
||||
PartialStreamTest::PartialStreamTest(const std::string& rName): CppUnit::TestCase(rName)
|
||||
PartialStreamTest::PartialStreamTest(const std::string& name): CppUnit::TestCase(name)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@
|
||||
using namespace Poco::Zip;
|
||||
|
||||
|
||||
ZipTest::ZipTest(const std::string& rName): CppUnit::TestCase(rName)
|
||||
ZipTest::ZipTest(const std::string& name): CppUnit::TestCase(name)
|
||||
{
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user