mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-24 17:30:44 +02:00
Revert "GH #1050 Zip: fix gcc -Wshadow warnings"
This commit is contained in:
committed by
GitHub
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)();
|
typedef void (Fixture::*TestMethod)();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TestCaller(const std::string& rName, TestMethod test):
|
TestCaller(const std::string& name, TestMethod test):
|
||||||
TestCase(rName),
|
TestCase(name),
|
||||||
_test(test),
|
_test(test),
|
||||||
_fixture(new Fixture(rName))
|
_fixture(new Fixture(name))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ protected:
|
|||||||
|
|
||||||
|
|
||||||
// Constructs a test case
|
// 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.
|
// 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.
|
if(hdr.hasExtraField()) // Update sizes in header extension.
|
||||||
hdr.setZip64Data();
|
hdr.setZip64Data();
|
||||||
_out.seekp(hdr.getStartPos(), std::ios_base::beg);
|
_out.seekp(hdr.getStartPos(), std::ios_base::beg);
|
||||||
std::string headerString = hdr.createHeader();
|
std::string header = hdr.createHeader();
|
||||||
_out.write(headerString.c_str(), static_cast<std::streamsize>(headerString.size()));
|
_out.write(header.c_str(), static_cast<std::streamsize>(header.size()));
|
||||||
_out.seekp(0, std::ios_base::end);
|
_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 realFile(entry, *it);
|
||||||
Poco::Path renamedFile(aName, *it);
|
Poco::Path renamedFile(aName, *it);
|
||||||
Poco::File file(realFile);
|
Poco::File aFile(realFile);
|
||||||
if (file.isDirectory())
|
if (aFile.isDirectory())
|
||||||
{
|
{
|
||||||
realFile.makeDirectory();
|
realFile.makeDirectory();
|
||||||
renamedFile.makeDirectory();
|
renamedFile.makeDirectory();
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ const char ZipLocalFileHeader::HEADER[ZipCommon::HEADER_SIZE] = {'\x50', '\x4b',
|
|||||||
|
|
||||||
|
|
||||||
ZipLocalFileHeader::ZipLocalFileHeader(const Poco::Path& fileName,
|
ZipLocalFileHeader::ZipLocalFileHeader(const Poco::Path& fileName,
|
||||||
const Poco::DateTime& lastModified,
|
const Poco::DateTime& lastModifiedAt,
|
||||||
ZipCommon::CompressionMethod cm,
|
ZipCommon::CompressionMethod cm,
|
||||||
ZipCommon::CompressionLevel cl,
|
ZipCommon::CompressionLevel cl,
|
||||||
bool forceZip64):
|
bool forceZip64):
|
||||||
@@ -51,7 +51,7 @@ ZipLocalFileHeader::ZipLocalFileHeader(const Poco::Path& fileName,
|
|||||||
setHostSystem(ZipCommon::HS_FAT);
|
setHostSystem(ZipCommon::HS_FAT);
|
||||||
setEncryption(false);
|
setEncryption(false);
|
||||||
setExtraFieldSize(0);
|
setExtraFieldSize(0);
|
||||||
setLastModifiedAt(lastModified);
|
setLastModifiedAt(lastModifiedAt);
|
||||||
init(fileName, cm, cl);
|
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_assert (!fileName.empty());
|
||||||
Poco::Path aPath(fileName);
|
Poco::Path aPath(fileName);
|
||||||
|
|
||||||
if (directory)
|
if (isDirectory)
|
||||||
{
|
{
|
||||||
aPath.makeDirectory();
|
aPath.makeDirectory();
|
||||||
setCRC(0);
|
setCRC(0);
|
||||||
@@ -207,7 +207,7 @@ void ZipLocalFileHeader::setFileName(const std::string& fileName, bool directory
|
|||||||
_fileName = aPath.toString(Poco::Path::PATH_UNIX);
|
_fileName = aPath.toString(Poco::Path::PATH_UNIX);
|
||||||
if (_fileName[0] == '/')
|
if (_fileName[0] == '/')
|
||||||
_fileName = _fileName.substr(1);
|
_fileName = _fileName.substr(1);
|
||||||
if (directory)
|
if (isDirectory)
|
||||||
{
|
{
|
||||||
poco_assert_dbg (_fileName[_fileName.size()-1] == '/');
|
poco_assert_dbg (_fileName[_fileName.size()-1] == '/');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
using namespace Poco::Zip;
|
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;
|
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;
|
using namespace Poco::Zip;
|
||||||
|
|
||||||
|
|
||||||
ZipTest::ZipTest(const std::string& rName): CppUnit::TestCase(rName)
|
ZipTest::ZipTest(const std::string& name): CppUnit::TestCase(name)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user