Fix building wxIniConfig when wxUSE_BASE64=0

Use guards for wxUSE_BASE64 just as wxConfigBase does.
This commit is contained in:
PB
2022-04-30 16:29:13 +02:00
parent 74c0fe6dcc
commit 4ddaa9c0ce
2 changed files with 8 additions and 0 deletions

View File

@@ -81,11 +81,15 @@ protected:
// read/write // read/write
bool DoReadString(const wxString& key, wxString *pStr) const wxOVERRIDE; bool DoReadString(const wxString& key, wxString *pStr) const wxOVERRIDE;
bool DoReadLong(const wxString& key, long *plResult) const wxOVERRIDE; bool DoReadLong(const wxString& key, long *plResult) const wxOVERRIDE;
#if wxUSE_BASE64
bool DoReadBinary(const wxString& key, wxMemoryBuffer *buf) const wxOVERRIDE; bool DoReadBinary(const wxString& key, wxMemoryBuffer *buf) const wxOVERRIDE;
#endif // wxUSE_BASE64
bool DoWriteString(const wxString& key, const wxString& szValue) wxOVERRIDE; bool DoWriteString(const wxString& key, const wxString& szValue) wxOVERRIDE;
bool DoWriteLong(const wxString& key, long lValue) wxOVERRIDE; bool DoWriteLong(const wxString& key, long lValue) wxOVERRIDE;
#if wxUSE_BASE64
bool DoWriteBinary(const wxString& key, const wxMemoryBuffer& buf) wxOVERRIDE; bool DoWriteBinary(const wxString& key, const wxMemoryBuffer& buf) wxOVERRIDE;
#endif // wxUSE_BASE64
private: private:
// helpers // helpers

View File

@@ -358,6 +358,8 @@ bool wxIniConfig::DoWriteLong(const wxString& szKey, long lValue)
return Write(szKey, wxString::Format(wxT("%ld"), lValue)); return Write(szKey, wxString::Format(wxT("%ld"), lValue));
} }
#if wxUSE_BASE64
bool wxIniConfig::DoReadBinary(const wxString& WXUNUSED(key), bool wxIniConfig::DoReadBinary(const wxString& WXUNUSED(key),
wxMemoryBuffer * WXUNUSED(buf)) const wxMemoryBuffer * WXUNUSED(buf)) const
{ {
@@ -374,6 +376,8 @@ bool wxIniConfig::DoWriteBinary(const wxString& WXUNUSED(key),
return false; return false;
} }
#endif // wxUSE_BASE64
bool wxIniConfig::Flush(bool /* bCurrentOnly */) bool wxIniConfig::Flush(bool /* bCurrentOnly */)
{ {
// this is just the way it works // this is just the way it works