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

Workaround for GPDebug::Log not working with format %s #1264

Merged
merged 1 commit into from
Dec 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -824,6 +824,7 @@ void GaussianProcessGuider::SetLearningRate(double learning_rate)
class NullDebugLog : public GPDebug
{
void Log(const char *fmt, ...) { }
void Write(const char *what) { }
};

class GPDebug *GPDebug = new NullDebugLog();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ class GPDebug
static void SetGPDebug(GPDebug *logger);
virtual ~GPDebug();
virtual void Log(const char *format, ...) = 0;
virtual void Write(const char *what) = 0;
};

extern class GPDebug *GPDebug;
Expand Down
1 change: 1 addition & 0 deletions src/mount.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,7 @@ static GuideAlgorithm *MakeGaussianProcessGuideAlgo(Mount *mount, GuideAxis axis
Debug.Write(wxString::FormatV(format + wxString("\n"), ap));
va_end(ap);
}
void Write(const char *what) { Debug.Write(wxString(what) + _T("\n")); }
};
GPDebug::SetGPDebug(new PHD2DebugLogger());
s_gp_debug_inited = true;
Expand Down
Loading