add wxUSE_BASE64 checks around DoRead/WriteBinary() functions

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47508 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-07-16 20:38:42 +00:00
parent 8e16c3f2b6
commit 434e29032f
3 changed files with 21 additions and 1 deletions

View File

@@ -918,6 +918,8 @@ bool wxFileConfig::DoReadLong(const wxString& key, long *pl) const
return str.ToLong(pl);
}
#if wxUSE_BASE64
bool wxFileConfig::DoReadBinary(const wxString& key, wxMemoryBuffer* buf) const
{
wxCHECK_MSG( buf, false, _T("NULL buffer") );
@@ -930,6 +932,8 @@ bool wxFileConfig::DoReadBinary(const wxString& key, wxMemoryBuffer* buf) const
return true;
}
#endif // wxUSE_BASE64
bool wxFileConfig::DoWriteString(const wxString& key, const wxString& szValue)
{
wxConfigPathChanger path(this, key);
@@ -995,11 +999,15 @@ bool wxFileConfig::DoWriteLong(const wxString& key, long lValue)
return Write(key, wxString::Format(_T("%ld"), lValue));
}
#if wxUSE_BASE64
bool wxFileConfig::DoWriteBinary(const wxString& key, const wxMemoryBuffer& buf)
{
return Write(key, wxBase64Encode(buf));
}
#endif // wxUSE_BASE64
bool wxFileConfig::Flush(bool /* bCurrentOnly */)
{
if ( !IsDirty() || !m_fnLocalFile.GetFullPath() )