remove always-true tests of unsigned >= 0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66655 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -291,13 +291,13 @@ wxRect wxRichTextFloatCollector::GetAvailableRect(int startY, int endY)
|
|||||||
if (m_left.GetCount() != 0)
|
if (m_left.GetCount() != 0)
|
||||||
{
|
{
|
||||||
unsigned int i = SearchAdjacentRect(m_left, startY);
|
unsigned int i = SearchAdjacentRect(m_left, startY);
|
||||||
if (i >= 0 && i < m_left.GetCount())
|
if (i < m_left.GetCount())
|
||||||
widthLeft = GetWidthFromFloatRect(m_left, i, startY, endY);
|
widthLeft = GetWidthFromFloatRect(m_left, i, startY, endY);
|
||||||
}
|
}
|
||||||
if (m_right.GetCount() != 0)
|
if (m_right.GetCount() != 0)
|
||||||
{
|
{
|
||||||
unsigned int j = SearchAdjacentRect(m_right, startY);
|
unsigned int j = SearchAdjacentRect(m_right, startY);
|
||||||
if (j >= 0 && j < m_right.GetCount())
|
if (j < m_right.GetCount())
|
||||||
widthRight = GetWidthFromFloatRect(m_right, j, startY, endY);
|
widthRight = GetWidthFromFloatRect(m_right, j, startY, endY);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -325,10 +325,10 @@ void wxRichTextFloatCollector::DrawFloat(const wxRichTextFloatRectMapArray& arra
|
|||||||
int end = rect.y + rect.height;
|
int end = rect.y + rect.height;
|
||||||
unsigned int i, j;
|
unsigned int i, j;
|
||||||
i = SearchAdjacentRect(array, start);
|
i = SearchAdjacentRect(array, start);
|
||||||
if (i < 0 || i >= array.GetCount())
|
if (i >= array.GetCount())
|
||||||
return;
|
return;
|
||||||
j = SearchAdjacentRect(array, end);
|
j = SearchAdjacentRect(array, end);
|
||||||
if (j < 0 || j >= array.GetCount())
|
if (j >= array.GetCount())
|
||||||
j = array.GetCount() - 1;
|
j = array.GetCount() - 1;
|
||||||
while (i <= j)
|
while (i <= j)
|
||||||
{
|
{
|
||||||
@@ -353,7 +353,7 @@ int wxRichTextFloatCollector::HitTestFloat(const wxRichTextFloatRectMapArray& ar
|
|||||||
if (array.GetCount() == 0)
|
if (array.GetCount() == 0)
|
||||||
return wxRICHTEXT_HITTEST_NONE;
|
return wxRICHTEXT_HITTEST_NONE;
|
||||||
i = SearchAdjacentRect(array, pt.y);
|
i = SearchAdjacentRect(array, pt.y);
|
||||||
if (i < 0 || i >= array.GetCount())
|
if (i >= array.GetCount())
|
||||||
return wxRICHTEXT_HITTEST_NONE;
|
return wxRICHTEXT_HITTEST_NONE;
|
||||||
wxPoint point = array[i]->anchor->GetPosition();
|
wxPoint point = array[i]->anchor->GetPosition();
|
||||||
wxSize size = array[i]->anchor->GetCachedSize();
|
wxSize size = array[i]->anchor->GetCachedSize();
|
||||||
|
Reference in New Issue
Block a user