allow compilation with wxUSE_DATETIME == 0 (patch 679822)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19128 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2003-02-06 00:53:46 +00:00
parent 83911a5a4d
commit e2b87f38d9
15 changed files with 109 additions and 16 deletions

View File

@@ -38,7 +38,7 @@ class MemFSHashObj : public wxObject
m_Data = new char[len];
memcpy(m_Data, data, len);
m_Len = len;
m_Time = wxDateTime::Now();
InitTime();
}
MemFSHashObj(wxMemoryOutputStream& stream)
@@ -46,7 +46,7 @@ class MemFSHashObj : public wxObject
m_Len = stream.GetSize();
m_Data = new char[m_Len];
stream.CopyTo(m_Data, m_Len);
m_Time = wxDateTime::Now();
InitTime();
}
~MemFSHashObj()
@@ -56,9 +56,19 @@ class MemFSHashObj : public wxObject
char *m_Data;
size_t m_Len;
#if wxUSE_DATETIME
wxDateTime m_Time;
#endif // wxUSE_DATETIME
DECLARE_NO_COPY_CLASS(MemFSHashObj)
private:
void InitTime()
{
#if wxUSE_DATETIME
m_Time = wxDateTime::Now();
#endif // wxUSE_DATETIME
}
};
@@ -106,8 +116,11 @@ wxFSFile* wxMemoryFSHandler::OpenFile(wxFileSystem& WXUNUSED(fs), const wxString
else return new wxFSFile(new wxMemoryInputStream(obj -> m_Data, obj -> m_Len),
location,
GetMimeTypeFromExt(location),
GetAnchor(location),
obj -> m_Time);
GetAnchor(location)
#if wxUSE_DATETIME
, obj -> m_Time
#endif // wxUSE_DATETIME
);
}
else return NULL;
}