From 4ddaa9c0ce6fd40bb0d7309a0b2e243eb91b145d Mon Sep 17 00:00:00 2001 From: PB Date: Sat, 30 Apr 2022 16:29:13 +0200 Subject: [PATCH] Fix building wxIniConfig when wxUSE_BASE64=0 Use guards for wxUSE_BASE64 just as wxConfigBase does. --- include/wx/msw/iniconf.h | 4 ++++ src/msw/iniconf.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/include/wx/msw/iniconf.h b/include/wx/msw/iniconf.h index d10854bf4d..5f3f3435e7 100644 --- a/include/wx/msw/iniconf.h +++ b/include/wx/msw/iniconf.h @@ -81,11 +81,15 @@ protected: // read/write bool DoReadString(const wxString& key, wxString *pStr) const wxOVERRIDE; bool DoReadLong(const wxString& key, long *plResult) const wxOVERRIDE; +#if wxUSE_BASE64 bool DoReadBinary(const wxString& key, wxMemoryBuffer *buf) const wxOVERRIDE; +#endif // wxUSE_BASE64 bool DoWriteString(const wxString& key, const wxString& szValue) wxOVERRIDE; bool DoWriteLong(const wxString& key, long lValue) wxOVERRIDE; +#if wxUSE_BASE64 bool DoWriteBinary(const wxString& key, const wxMemoryBuffer& buf) wxOVERRIDE; +#endif // wxUSE_BASE64 private: // helpers diff --git a/src/msw/iniconf.cpp b/src/msw/iniconf.cpp index b66f0beb21..dbaa82d7c9 100644 --- a/src/msw/iniconf.cpp +++ b/src/msw/iniconf.cpp @@ -358,6 +358,8 @@ bool wxIniConfig::DoWriteLong(const wxString& szKey, long lValue) return Write(szKey, wxString::Format(wxT("%ld"), lValue)); } +#if wxUSE_BASE64 + bool wxIniConfig::DoReadBinary(const wxString& WXUNUSED(key), wxMemoryBuffer * WXUNUSED(buf)) const { @@ -374,6 +376,8 @@ bool wxIniConfig::DoWriteBinary(const wxString& WXUNUSED(key), return false; } +#endif // wxUSE_BASE64 + bool wxIniConfig::Flush(bool /* bCurrentOnly */) { // this is just the way it works