mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 07:43:03 +04:00
Merge pull request #15417 from alalek:ts_fix_callback_signature
This commit is contained in:
@@ -512,8 +512,9 @@ string TS::str_from_code( const TS::FailureCode code )
|
||||
return "Generic/Unknown";
|
||||
}
|
||||
|
||||
static int tsErrorCallback( int status, const char* func_name, const char* err_msg, const char* file_name, int line, TS* ts )
|
||||
static int tsErrorCallback( int status, const char* func_name, const char* err_msg, const char* file_name, int line, void* data )
|
||||
{
|
||||
TS* ts = (TS*)data;
|
||||
const char* delim = std::string(err_msg).find('\n') == std::string::npos ? "" : "\n";
|
||||
ts->printf(TS::LOG, "OpenCV Error:\n\t%s (%s%s) in %s, file %s, line %d\n", cvErrorStr(status), delim, err_msg, func_name[0] != 0 ? func_name : "unknown function", file_name, line);
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user