mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-12 18:20:26 +01:00
const correctness fix
This commit is contained in:
parent
1df5f56449
commit
c351f65957
@ -78,10 +78,10 @@ public:
|
||||
|
||||
const std::string& getFileComment() const;
|
||||
|
||||
void getVersionMadeBy(int& major, int& minor);
|
||||
void getVersionMadeBy(int& major, int& minor) const;
|
||||
/// The ZIP version used to create the file
|
||||
|
||||
void getRequiredVersion(int& major, int& minor);
|
||||
void getRequiredVersion(int& major, int& minor) const;
|
||||
/// The minimum version required to extract the data
|
||||
|
||||
ZipCommon::HostSystem getHostSystem() const;
|
||||
@ -319,14 +319,14 @@ inline Poco::UInt16 ZipFileInfo::getFileCommentLength() const
|
||||
}
|
||||
|
||||
|
||||
inline void ZipFileInfo::getVersionMadeBy(int& major, int& minor)
|
||||
inline void ZipFileInfo::getVersionMadeBy(int& major, int& minor) const
|
||||
{
|
||||
major = (_rawInfo[VERSIONMADEBY_POS]/10);
|
||||
minor = (_rawInfo[VERSIONMADEBY_POS]%10);
|
||||
}
|
||||
|
||||
|
||||
inline void ZipFileInfo::getRequiredVersion(int& major, int& minor)
|
||||
inline void ZipFileInfo::getRequiredVersion(int& major, int& minor) const
|
||||
{
|
||||
major = (_rawInfo[VERSION_NEEDED_POS]/10);
|
||||
minor = (_rawInfo[VERSION_NEEDED_POS]%10);
|
||||
@ -423,7 +423,7 @@ inline void ZipFileInfo::setRequiredVersion(int major, int minor)
|
||||
{
|
||||
poco_assert (minor < 10);
|
||||
poco_assert (major < 24);
|
||||
Poco::UInt8 val = static_cast<unsigned char>(major)*10+static_cast<unsigned char>(minor);
|
||||
Poco::UInt8 val = static_cast<Poco::UInt8>(major)*10 + static_cast<Poco::UInt8>(minor);
|
||||
_rawInfo[VERSIONMADEBY_POS] = static_cast<char>(val);
|
||||
_rawInfo[VERSION_NEEDED_POS] = static_cast<char>(val);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user