Commit a1d0f3e4 authored by Davis King's avatar Davis King

Changed the code slightly to avoid warnings from gcc 4.3.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402706
parent e0fac30c
...@@ -93,15 +93,13 @@ namespace dlib ...@@ -93,15 +93,13 @@ namespace dlib
for (long c = 0; c < lhs.nc(); c+=bs) for (long c = 0; c < lhs.nc(); c+=bs)
{ {
// make a rect for the block from lhs // make a rect for the block from lhs
rectangle lhs_block(c, r, c+bs-1, r+bs-1); rectangle lhs_block(c, r, std::min(c+bs-1,lhs.nc()-1), std::min(r+bs-1,lhs.nr()-1));
lhs_block = lhs_block.intersect(get_rect(lhs));
// now loop over all the rhs blocks we have to multiply with the current lhs block // 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) for (long i = 0; i < rhs.nc(); i += bs)
{ {
// make a rect for the block from rhs // make a rect for the block from rhs
rectangle rhs_block(i, c, i+bs-1, c+bs-1); rectangle rhs_block(i, c, std::min(i+bs-1,rhs.nc()-1), std::min(c+bs-1,rhs.nr()-1));
rhs_block = rhs_block.intersect(get_rect(rhs));
// make a target rect in res // make a target rect in res
rectangle res_block(rhs_block.left(),lhs_block.top(), rhs_block.right(), lhs_block.bottom()); rectangle res_block(rhs_block.left(),lhs_block.top(), rhs_block.right(), lhs_block.bottom());
......
...@@ -92,6 +92,7 @@ namespace dlib ...@@ -92,6 +92,7 @@ namespace dlib
T temp; T temp;
// do this just to avoid a compiler warning // do this just to avoid a compiler warning
assign_zero_if_built_in_scalar_type(temp); assign_zero_if_built_in_scalar_type(temp);
assign_zero_if_built_in_scalar_type(partition_element);
queue.dequeue(partition_element); queue.dequeue(partition_element);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment