A minor optimization.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%404232
This commit is contained in:
Davis King 2011-04-23 13:48:53 +00:00
parent b4fbf7578b
commit 1faf23e874
1 changed files with 4 additions and 2 deletions

View File

@ -212,8 +212,10 @@ namespace dlib
rectangle rect(left, q.top().top_min,
right, q.top().bottom_min);
if (weight > thresh)
results.push_back(rect);
if (weight <= thresh)
break;
results.push_back(rect);
if (results.size() >= max_rects)
break;