compilation fix for g++ which doesn't like using wxLogMessage in wxON_BLOCK_SCOPE_EXIT

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57669 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2008-12-30 15:06:34 +00:00
parent f539560019
commit f98f168e6c

View File

@ -32,7 +32,6 @@
#include "wx/socket.h"
#include "wx/url.h"
#include "wx/sstream.h"
#include "wx/scopeguard.h"
#include <memory>
// --------------------------------------------------------------------------
@ -104,6 +103,24 @@ private:
DECLARE_EVENT_TABLE()
};
// simple helper class to log start and end of each test
class TestLogger
{
public:
TestLogger(const wxString& name) : m_name(name)
{
wxLogMessage("=== %s test begins ===", m_name);
}
~TestLogger()
{
wxLogMessage("=== %s test ends ===", m_name);
}
private:
const wxString m_name;
};
// --------------------------------------------------------------------------
// constants
// --------------------------------------------------------------------------
@ -595,8 +612,7 @@ void MyFrame::OnTestURL(wxCommandEvent& WXUNUSED(event))
s_urlname = urlname;
wxLogMessage("=== URL test begins ===");
wxON_BLOCK_EXIT1( wxLogMessage, "=== URL test ends ===" );
TestLogger logtest("URL");
// Parse the URL
wxURL url(urlname);