Skip to content

Commit

Permalink
Resolved a few warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
gunterkoenigsmann committed Feb 10, 2024
1 parent d4c6374 commit 56d53ad
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions src/NullLog.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,29 +21,20 @@

/*!\file
This file defines the class ErrorRedirector that redirects wx Errors to a dialogue
It is a customized copy of a portion of wxWidget's log.cpp.
This file defines the class NullLog that just ignores log messages it is sent
*/

#ifndef NULLLOG_H
#define NULLLOG_H

#include "precomp.h"
#include <wx/log.h>
#include <memory>

//! Redirect error messages (but not warnings) to a second target.
//! Redirect error messages to /dev/null
class NullLog : public wxLog
{
public:
/**
Sets the specified @c logger (which may be NULL) as the default log
target but the log messages are also passed to the previous log target if any.
*/
explicit NullLog();

//! Restores the previous log target
virtual ~NullLog() override {}

/*! This method is called from the idle loop.
Expand All @@ -52,9 +43,9 @@ class NullLog : public wxLog
*/
void Flush() override {}

void DoLogRecord(wxLogLevel level,
const wxString& msg,
const wxLogRecordInfo& info) override {}
void DoLogRecord(wxLogLevel WXUNUSED(level),
const wxString& WXUNUSED(msg),
const wxLogRecordInfo& WXUNUSED(info)) override {}

};

Expand Down

0 comments on commit 56d53ad

Please sign in to comment.