patch 1073385
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30791 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -67,6 +67,7 @@ public:
|
||||
|
||||
protected:
|
||||
wxArchiveEntry() : m_notifier(NULL) { }
|
||||
wxArchiveEntry(const wxArchiveEntry& e) : wxObject(e), m_notifier(NULL) { }
|
||||
|
||||
virtual void SetOffset(wxFileOffset offset) = 0;
|
||||
virtual wxArchiveEntry* DoClone() const = 0;
|
||||
@@ -211,14 +212,14 @@ private:
|
||||
#include <iterator>
|
||||
#include <utility>
|
||||
|
||||
template <class X, class Y>
|
||||
void WXDLLIMPEXP_BASE _wxSetArchiveIteratorValue(
|
||||
template <class X, class Y> inline
|
||||
void _wxSetArchiveIteratorValue(
|
||||
X& val, Y entry, void *WXUNUSED(d))
|
||||
{
|
||||
val = X(entry);
|
||||
}
|
||||
template <class X, class Y, class Z>
|
||||
void WXDLLIMPEXP_BASE _wxSetArchiveIteratorValue(
|
||||
template <class X, class Y, class Z> inline
|
||||
void _wxSetArchiveIteratorValue(
|
||||
std::pair<X, Y>& val, Z entry, Z WXUNUSED(d))
|
||||
{
|
||||
val = std::make_pair(X(entry->GetInternalName()), Y(entry));
|
||||
@@ -229,7 +230,7 @@ template <class Arc, class T = Arc::entry_type*>
|
||||
#else
|
||||
template <class Arc, class T = typename Arc::entry_type*>
|
||||
#endif
|
||||
class WXDLLIMPEXP_BASE wxArchiveIterator
|
||||
class wxArchiveIterator
|
||||
{
|
||||
public:
|
||||
typedef std::input_iterator_tag iterator_category;
|
||||
@@ -283,11 +284,11 @@ public:
|
||||
return it;
|
||||
}
|
||||
|
||||
bool operator ==(const wxArchiveIterator& j) {
|
||||
return (*this).m_rep == j.m_rep;
|
||||
bool operator ==(const wxArchiveIterator& j) const {
|
||||
return m_rep == j.m_rep;
|
||||
}
|
||||
|
||||
bool operator !=(const wxArchiveIterator& j) {
|
||||
bool operator !=(const wxArchiveIterator& j) const {
|
||||
return !(*this == j);
|
||||
}
|
||||
|
||||
|
@@ -455,29 +455,29 @@ private:
|
||||
#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) |
|
||||
@@ -492,7 +492,7 @@ bool wxZipEntry::IsMadeByUnix() const
|
||||
|| ((pattern >> m_SystemMadeBy) & 1);
|
||||
}
|
||||
|
||||
void wxZipEntry::SetIsText(bool isText)
|
||||
inline void wxZipEntry::SetIsText(bool isText)
|
||||
{
|
||||
if (isText)
|
||||
m_InternalAttributes |= TEXT_ATTR;
|
||||
@@ -500,7 +500,7 @@ void wxZipEntry::SetIsText(bool isText)
|
||||
m_InternalAttributes &= ~TEXT_ATTR;
|
||||
}
|
||||
|
||||
void wxZipEntry::SetIsReadOnly(bool isReadOnly)
|
||||
inline void wxZipEntry::SetIsReadOnly(bool isReadOnly)
|
||||
{
|
||||
if (isReadOnly)
|
||||
SetMode(GetMode() & ~0222);
|
||||
@@ -508,8 +508,8 @@ void wxZipEntry::SetIsReadOnly(bool isReadOnly)
|
||||
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);
|
||||
|
Reference in New Issue
Block a user