mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-27 11:06:50 +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:
@@ -312,7 +312,7 @@ std::string ProcessRunnerTest::cmdLine(const std::string& cmd, const ProcessRunn
|
||||
}
|
||||
|
||||
|
||||
void ProcessRunnerTest::checkTimeout(const Stopwatch& sw, const std::string& msg, int timeoutMS, int line)
|
||||
void ProcessRunnerTest::checkTimeout(const Stopwatch& sw, const std::string& msg, int timeoutMS, LineNumber line)
|
||||
{
|
||||
if (sw.elapsedSeconds()*1000 > timeoutMS)
|
||||
{
|
||||
@@ -341,4 +341,4 @@ CppUnit::Test* ProcessRunnerTest::suite()
|
||||
CppUnit_addTest(pSuite, ProcessRunnerTest, testProcessRunner);
|
||||
|
||||
return pSuite;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user