mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-26 10:32:56 +01:00
fix(Logger): Autodetect line number type from __LINE__ (#4553)
MS Visual Studio can use type long for __LINE__ macro when /ZI compilation flag is used - https://learn.microsoft.com/en-us/cpp/build/ reference/z7-zi-zi-debug-information-format?view=msvc-170#zi-1 This breaks some poco interfaces, for ex. logger We should fix type for line number
This commit is contained in:
@@ -45,7 +45,7 @@ public:
|
||||
/// Writes a message to the debugger log, if available, otherwise to
|
||||
/// standard error output.
|
||||
|
||||
static void message(const std::string& msg, const char* file, int line);
|
||||
static void message(const std::string& msg, const char* file, LineNumber line);
|
||||
/// Writes a message to the debugger log, if available, otherwise to
|
||||
/// standard error output.
|
||||
|
||||
@@ -57,10 +57,10 @@ public:
|
||||
static void enter(const std::string& msg);
|
||||
/// Writes a debug message to the debugger log and breaks into it.
|
||||
|
||||
static void enter(const std::string& msg, const char* file, int line);
|
||||
static void enter(const std::string& msg, const char* file, LineNumber line);
|
||||
/// Writes a debug message to the debugger log and breaks into it.
|
||||
|
||||
static void enter(const char* file, int line);
|
||||
static void enter(const char* file, LineNumber line);
|
||||
/// Writes a debug message to the debugger log and breaks into it.
|
||||
|
||||
static constexpr std::string_view sourceFile(const std::string_view& fileName)
|
||||
|
||||
Reference in New Issue
Block a user