From 88f5ad160a0ba0db031769d6444233eaf0bda38f Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 14 Jun 2025 11:16:06 -0400 Subject: [PATCH] use "const std::string &" instead of "const char *" it will be converted anyway --- src/error.cpp | 2 +- src/error.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/error.cpp b/src/error.cpp index 6de19b6323..728a744b77 100644 --- a/src/error.cpp +++ b/src/error.cpp @@ -306,7 +306,7 @@ ErrorType Error::get_last_error_type() const set the last error message and error type ------------------------------------------------------------------------- */ -void Error::set_last_error(const char *msg, ErrorType type) +void Error::set_last_error(const std::string &msg, ErrorType type) { last_error_message = msg; last_error_type = type; diff --git a/src/error.h b/src/error.h index 5f5b349bc8..8d18dcc09a 100644 --- a/src/error.h +++ b/src/error.h @@ -97,7 +97,7 @@ class Error : protected Pointers { std::string get_last_error() const; ErrorType get_last_error_type() const; - void set_last_error(const char *msg, ErrorType type = ERROR_NORMAL); + void set_last_error(const std::string &msg, ErrorType type = ERROR_NORMAL); int set_show_error(const int flag); private: