// set accessors
void SetDateTime(const wxDateTime& dt) { m_DateTime = dt; }
void SetSize(wxFileOffset size) { m_Size = size; }
- void SetMethod(int method) { m_Method = method; }
+ void SetMethod(int method) { m_Method = (wxUint16)method; }
void SetComment(const wxString& comment) { m_Comment = comment; }
void SetExternalAttributes(wxUint32 attr ) { m_ExternalAttributes = attr; }
void SetSystemMadeBy(int system);
int GetDiskStart() const { return m_DiskStart; }
int GetInternalAttributes() const { return m_InternalAttributes; }
- void SetVersionNeeded(int version) { m_VersionNeeded = version; }
+ void SetVersionNeeded(int version) { m_VersionNeeded = (wxUint16)version; }
void SetOffset(wxFileOffset offset) { m_Offset = offset; }
- void SetFlags(int flags) { m_Flags = flags; }
- void SetVersionMadeBy(int version) { m_VersionMadeBy = version; }
+ void SetFlags(int flags) { m_Flags = (wxUint16)flags; }
+ void SetVersionMadeBy(int version) { m_VersionMadeBy = (wxUint8)version; }
void SetCrc(wxUint32 crc) { m_Crc = crc; }
void SetCompressedSize(wxFileOffset size) { m_CompressedSize = size; }
void SetKey(wxFileOffset offset) { m_Key = offset; }
- void SetDiskStart(int start) { m_DiskStart = start; }
- void SetInternalAttributes(int attr) { m_InternalAttributes = attr; }
+ void SetDiskStart(int start) { m_DiskStart = (wxUint16)start; }
+ void SetInternalAttributes(int attr) { m_InternalAttributes = (wxUint16)attr; }
virtual wxZipEntry *ZipClone() const { return new wxZipEntry(*this); }
#if wxUSE_STL || defined WX_TEST_ARCHIVE_ITERATOR
typedef wxArchiveIterator<wxZipInputStream> wxZipIter;
typedef wxArchiveIterator<wxZipInputStream,
- std::pair<wxString, wxZipEntry*> > wxZipPairIter;
+ std::pair<wxString, wxZipEntry*> > wxZipPairIter;
#endif
/////////////////////////////////////////////////////////////////////////////
// wxZipEntry inlines
-bool wxZipEntry::IsText() const
+inline bool wxZipEntry::IsText() const
{
return (m_InternalAttributes & TEXT_ATTR) != 0;
}
-bool wxZipEntry::IsDir() const
+inline bool wxZipEntry::IsDir() const
{
return (m_ExternalAttributes & wxZIP_A_SUBDIR) != 0;
}
-bool wxZipEntry::IsReadOnly() const
+inline bool wxZipEntry::IsReadOnly() const
{
return (m_ExternalAttributes & wxZIP_A_RDONLY) != 0;
}
-bool wxZipEntry::IsMadeByUnix() const
+inline bool wxZipEntry::IsMadeByUnix() const
{
const int pattern =
(1 << wxZIP_SYSTEM_OPENVMS) |
|| ((pattern >> m_SystemMadeBy) & 1);
}
-void wxZipEntry::SetIsText(bool isText)
+inline void wxZipEntry::SetIsText(bool isText)
{
if (isText)
m_InternalAttributes |= TEXT_ATTR;
m_InternalAttributes &= ~TEXT_ATTR;
}
-void wxZipEntry::SetIsReadOnly(bool isReadOnly)
+inline void wxZipEntry::SetIsReadOnly(bool isReadOnly)
{
if (isReadOnly)
SetMode(GetMode() & ~0222);
SetMode(GetMode() | 0200);
}
-void wxZipEntry::SetName(const wxString& name,
- wxPathFormat format /*=wxPATH_NATIVE*/)
+inline void wxZipEntry::SetName(const wxString& name,
+ wxPathFormat format /*=wxPATH_NATIVE*/)
{
bool isDir;
m_Name = GetInternalName(name, format, &isDir);