prevent applying zero offsets to all rects

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15361 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus 2005-12-06 13:45:15 +00:00
parent a289cd317f
commit a2b387ad6e

View File

@ -38,7 +38,6 @@
// Anyway, we can change that behaviour if we want, but BeOS's BRegion seems to behave exactly // Anyway, we can change that behaviour if we want, but BeOS's BRegion seems to behave exactly
// like this. // like this.
#include <cstdlib> #include <cstdlib>
#include <cstring> #include <cstring>
@ -294,6 +293,9 @@ BRegion::PrintToStream() const
void void
BRegion::OffsetBy(int32 dh, int32 dv) BRegion::OffsetBy(int32 dh, int32 dv)
{ {
if (dh == 0 && dv == 0)
return;
if (count > 0) { if (count > 0) {
for (long c = 0; c < count; c++) for (long c = 0; c < count; c++)
offset_rect(data[c], dh, dv); offset_rect(data[c], dh, dv);