Drop cv:: prefix from cv::String used inside the cv namespace
This commit is contained in:
@@ -54,7 +54,7 @@ namespace
|
||||
struct ErrorEntry
|
||||
{
|
||||
int code;
|
||||
cv::String str;
|
||||
String str;
|
||||
};
|
||||
|
||||
struct ErrorEntryComparer
|
||||
@@ -64,11 +64,11 @@ namespace
|
||||
bool operator()(const ErrorEntry& e) const { return e.code == code; }
|
||||
};
|
||||
|
||||
cv::String getErrorString(int code, const ErrorEntry* errors, size_t n)
|
||||
String getErrorString(int code, const ErrorEntry* errors, size_t n)
|
||||
{
|
||||
size_t idx = std::find_if(errors, errors + n, ErrorEntryComparer(code)) - errors;
|
||||
|
||||
const cv::String& msg = (idx != n) ? errors[idx].str : cv::String("Unknown error code");
|
||||
const String& msg = (idx != n) ? errors[idx].str : String("Unknown error code");
|
||||
|
||||
std::ostringstream ostr;
|
||||
ostr << msg << " [Code = " << code << "]";
|
||||
@@ -221,25 +221,25 @@ namespace cv
|
||||
{
|
||||
void nppError(int code, const char *file, const int line, const char *func)
|
||||
{
|
||||
cv::String msg = getErrorString(code, npp_errors, npp_error_num);
|
||||
String msg = getErrorString(code, npp_errors, npp_error_num);
|
||||
cv::gpu::error(msg.c_str(), file, line, func);
|
||||
}
|
||||
|
||||
void ncvError(int code, const char *file, const int line, const char *func)
|
||||
{
|
||||
cv::String msg = getErrorString(code, ncv_errors, ncv_error_num);
|
||||
String msg = getErrorString(code, ncv_errors, ncv_error_num);
|
||||
cv::gpu::error(msg.c_str(), file, line, func);
|
||||
}
|
||||
|
||||
void cufftError(int code, const char *file, const int line, const char *func)
|
||||
{
|
||||
cv::String msg = getErrorString(code, cufft_errors, cufft_error_num);
|
||||
String msg = getErrorString(code, cufft_errors, cufft_error_num);
|
||||
cv::gpu::error(msg.c_str(), file, line, func);
|
||||
}
|
||||
|
||||
void cublasError(int code, const char *file, const int line, const char *func)
|
||||
{
|
||||
cv::String msg = getErrorString(code, cublas_errors, cublas_error_num);
|
||||
String msg = getErrorString(code, cublas_errors, cublas_error_num);
|
||||
cv::gpu::error(msg.c_str(), file, line, func);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user