Changed the code slightly to avoid warnings from gcc 4.3.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402706
This commit is contained in:
Davis King 2008-12-05 23:11:06 +00:00
parent e0fac30c52
commit a1d0f3e4a5
2 changed files with 3 additions and 4 deletions

View File

@ -93,15 +93,13 @@ namespace dlib
for (long c = 0; c < lhs.nc(); c+=bs)
{
// make a rect for the block from lhs
rectangle lhs_block(c, r, c+bs-1, r+bs-1);
lhs_block = lhs_block.intersect(get_rect(lhs));
rectangle lhs_block(c, r, std::min(c+bs-1,lhs.nc()-1), std::min(r+bs-1,lhs.nr()-1));
// now loop over all the rhs blocks we have to multiply with the current lhs block
for (long i = 0; i < rhs.nc(); i += bs)
{
// make a rect for the block from rhs
rectangle rhs_block(i, c, i+bs-1, c+bs-1);
rhs_block = rhs_block.intersect(get_rect(rhs));
rectangle rhs_block(i, c, std::min(i+bs-1,rhs.nc()-1), std::min(c+bs-1,rhs.nr()-1));
// make a target rect in res
rectangle res_block(rhs_block.left(),lhs_block.top(), rhs_block.right(), lhs_block.bottom());

View File

@ -92,6 +92,7 @@ namespace dlib
T temp;
// do this just to avoid a compiler warning
assign_zero_if_built_in_scalar_type(temp);
assign_zero_if_built_in_scalar_type(partition_element);
queue.dequeue(partition_element);