Skip to content

Commit

Permalink
Removing compile warnings for IE driver
Browse files Browse the repository at this point in the history
  • Loading branch information
jimevans committed Dec 19, 2018
1 parent aed1c2a commit 1d2c5df
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cpp/iedriver/Element.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1257,16 +1257,18 @@ LocationInfo Element::CalculateClickPoint(const LocationInfo location, const boo
viewport_rect.bottom = clickable_viewport.y + clickable_viewport.height;

RECT intersect_rect;
BOOL is_intersecting = ::IntersectRect(&intersect_rect, &element_rect, &viewport_rect);
BOOL is_intersecting = ::IntersectRect(&intersect_rect,
&element_rect,
&viewport_rect);
if (is_intersecting) {
corrected_width = intersect_rect.right - intersect_rect.left;
corrected_height = intersect_rect.bottom - intersect_rect.top;
}
}

LocationInfo click_location = {};
click_location.x = location.x + floor(corrected_width / 2.0);
click_location.y = location.y + floor(corrected_height / 2.0);
click_location.x = location.x + static_cast<long>(floor(corrected_width / 2.0));
click_location.y = location.y + static_cast<long>(floor(corrected_height / 2.0));
return click_location;
}

Expand Down

0 comments on commit 1d2c5df

Please sign in to comment.