Minimize usages of legacy C API inside the library
This commit is contained in:
@@ -63,22 +63,4 @@ bool initModule_softcascade(void)
|
||||
return (sc1->info() != 0) && (sc->info() != 0);
|
||||
}
|
||||
|
||||
namespace internal {
|
||||
void error(const char *error_string, const char *file, const int line, const char *func)
|
||||
{
|
||||
int code = CV_GpuApiCallError;
|
||||
|
||||
if (std::uncaught_exception())
|
||||
{
|
||||
const char* errorStr = cvErrorStr(code);
|
||||
const char* function = func ? func : "unknown function";
|
||||
|
||||
std::cerr << "OpenCV Error: " << errorStr << "(" << error_string << ") in " << function << ", file " << file << ", line " << line;
|
||||
std::cerr.flush();
|
||||
}
|
||||
else
|
||||
cv::error( cv::Exception(code, error_string, func, file, line) );
|
||||
}
|
||||
}
|
||||
|
||||
} }
|
Reference in New Issue
Block a user