All modules (except ocl and gpu) compiles and pass tests

This commit is contained in:
Andrey Kamaev
2013-03-20 20:13:46 +04:00
parent 762aefd71b
commit 2ad7b97f1c
91 changed files with 606 additions and 604 deletions

View File

@@ -51,7 +51,7 @@ namespace
struct ErrorEntry
{
int code;
std::string str;
cv::String str;
};
class ErrorEntryComparer
@@ -65,11 +65,11 @@ namespace
int code_;
};
std::string getErrorString(int code, const ErrorEntry* errors, size_t n)
cv::String getErrorString(int code, const ErrorEntry* errors, size_t n)
{
size_t idx = std::find_if(errors, errors + n, ErrorEntryComparer(code)) - errors;
const std::string& msg = (idx != n) ? errors[idx].str : std::string("Unknown error code");
const cv::String& msg = (idx != n) ? errors[idx].str : cv::String("Unknown error code");
std::ostringstream ostr;
ostr << msg << " [Code = " << code << "]";
@@ -131,7 +131,7 @@ namespace
const size_t cu_errors_num = sizeof(cu_errors) / sizeof(cu_errors[0]);
}
std::string cv::gpu::detail::cuGetErrString(CUresult res)
cv::String cv::gpu::detail::cuGetErrString(CUresult res)
{
return getErrorString(res, cu_errors, cu_errors_num);
}