Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send debug messages to Windows debugger #78838

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Move deinit() into the destructor
  • Loading branch information
alef committed Dec 31, 2024
commit 5cdaf81aaae15b57a634bd46cf6fd270afcb13bb
8 changes: 1 addition & 7 deletions src/debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,6 @@ struct DebugFile {
DebugFile();
~DebugFile();
void init( DebugOutput, const cata_path &filename );
void deinit();
std::ostream &get_file();
static DebugFile& instance() {
static DebugFile instance;
Expand All @@ -709,11 +708,6 @@ struct DebugFile {
DebugFile::DebugFile() = default;

DebugFile::~DebugFile()
{
deinit();
}

void DebugFile::deinit()
{
if( file && file.get() != &std::cerr ) {
output_repetitions( *file );
Expand Down Expand Up @@ -827,7 +821,7 @@ void setupDebug( DebugOutput output_mode )

void deinitDebug()
{
debugFile().deinit();
DebugFile::instance().~DebugFile();
}

// OStream Operators {{{2
Expand Down