mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 23:33:05 +04:00
Merge pull request #11353 from eecsninja:3.4
* Fix CV_Asserts with negation of strings
{!"string"} causes some compilers to throw a warning.
The value of the string is not that important -- it's only for printing
the assertion message.
Replace these calls with:
CV_Error(Error::StsError, "string")
to suppress the warning.
* remove unnecessary 'break' after CV_Error()
This commit is contained in:
committed by
Alexander Alekhin
parent
2b4b946689
commit
705464258e
@@ -638,7 +638,8 @@ private:
|
||||
pack.func = to_binary<double>;
|
||||
break;
|
||||
case 'r':
|
||||
default: { CV_Assert(!"type not support"); break; }
|
||||
default:
|
||||
CV_Error(cv::Error::StsError, "type is not supported");
|
||||
};
|
||||
|
||||
offset = static_cast<size_t>(cvAlign(static_cast<int>(offset), static_cast<int>(size)));
|
||||
@@ -797,7 +798,8 @@ private:
|
||||
pack.func = binary_to<double>;
|
||||
break;
|
||||
case 'r':
|
||||
default: { CV_Assert(!"type not support"); break; }
|
||||
default:
|
||||
CV_Error(cv::Error::StsError, "type is not supported");
|
||||
}; // need a better way for outputting error.
|
||||
|
||||
offset = static_cast<size_t>(cvAlign(static_cast<int>(offset), static_cast<int>(size)));
|
||||
@@ -815,7 +817,8 @@ private:
|
||||
case 'f': { pack.cv_type = CV_32F; break; }
|
||||
case 'd': { pack.cv_type = CV_64F; break; }
|
||||
case 'r':
|
||||
default: { CV_Assert(!"type is not support"); break; }
|
||||
default:
|
||||
CV_Error(cv::Error::StsError, "type is not supported");
|
||||
} // need a better way for outputting error.
|
||||
|
||||
binary_to_funcs.push_back(pack);
|
||||
|
||||
Reference in New Issue
Block a user