mirror of
https://github.com/opencv/opencv.git
synced 2025-06-07 17:44:04 +08:00
Merge pull request #20628 from alalek:fix_build_warnings_4.x
This commit is contained in:
commit
c11195d5e3
@ -1707,10 +1707,10 @@ void Chessboard::Board::normalizeOrientation(bool bblack)
|
|||||||
iter_bottom_left.getCell()->empty() || iter_bottom_right.getCell()->empty())
|
iter_bottom_left.getCell()->empty() || iter_bottom_right.getCell()->empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
float d1 = pow(top_left->top_left->x,2)+pow(top_left->top_left->y,2);
|
float d1 = top_left->top_left->dot(*top_left->top_left);
|
||||||
float d2 = pow((*iter_top_right)->x,2)+pow((*iter_top_right)->y,2);
|
float d2 = (*iter_top_right)->dot(*(*iter_top_right));
|
||||||
float d3 = pow((*iter_bottom_left)->x,2)+pow((*iter_bottom_left)->y,2);
|
float d3 = (*iter_bottom_left)->dot(*(*iter_bottom_left));
|
||||||
float d4 = pow((*iter_bottom_right)->x,2)+pow((*iter_bottom_right)->y,2);
|
float d4 = (*iter_bottom_right)->dot(*(*iter_bottom_right));
|
||||||
if(d2 <= d1 && d2 <= d3 && d2 <= d4) // top left is top right
|
if(d2 <= d1 && d2 <= d3 && d2 <= d4) // top left is top right
|
||||||
rotateLeft();
|
rotateLeft();
|
||||||
else if(d3 <= d1 && d3 <= d2 && d3 <= d4) // top left is bottom left
|
else if(d3 <= d1 && d3 <= d2 && d3 <= d4) // top left is bottom left
|
||||||
|
@ -292,7 +292,7 @@ struct StreamDataProvider : public cv::gapi::wip::onevpl::IDataProvider {
|
|||||||
|
|
||||||
size_t fetch_data(size_t out_data_size, void* out_data_buf) override {
|
size_t fetch_data(size_t out_data_size, void* out_data_buf) override {
|
||||||
data_stream.read(reinterpret_cast<char*>(out_data_buf), out_data_size);
|
data_stream.read(reinterpret_cast<char*>(out_data_buf), out_data_size);
|
||||||
return data_stream.gcount();
|
return (size_t)data_stream.gcount();
|
||||||
}
|
}
|
||||||
bool empty() const override {
|
bool empty() const override {
|
||||||
return data_stream.eof() || data_stream.bad();
|
return data_stream.eof() || data_stream.bad();
|
||||||
|
Loading…
Reference in New Issue
Block a user