diff options
author | Tor Lillqvist <tml@collabora.com> | 2015-06-18 10:37:01 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2015-06-18 11:43:19 +0300 |
commit | dc3d621411a1de2ec6b61da07741bdf1c80ffc1f (patch) | |
tree | 71c1eef613e033f05baac4bd8304a91691eda955 /vcl/source/outdev/rect.cxx | |
parent | 0aa10c0b3d5794cd5b701b57de2387eee12076b6 (diff) |
Assertions should tell the line number where the problem is
Let's not hide the assert() in a function whose sole purpose is to
call assert().
Change-Id: I7a8a04aad560b0f22398daabf12d00bbe58e89f1
Diffstat (limited to 'vcl/source/outdev/rect.cxx')
-rw-r--r-- | vcl/source/outdev/rect.cxx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/vcl/source/outdev/rect.cxx b/vcl/source/outdev/rect.cxx index a9ebc0a676d2..b06a52baa51f 100644 --- a/vcl/source/outdev/rect.cxx +++ b/vcl/source/outdev/rect.cxx @@ -16,6 +16,9 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ + +#include <cassert> + #include <sal/types.h> #include <tools/poly.hxx> @@ -29,7 +32,7 @@ void OutputDevice::DrawRect( const Rectangle& rRect ) { - assert_if_double_buffered_window(); + assert(!is_double_buffered_window()); if ( mpMetaFile ) mpMetaFile->AddAction( new MetaRectAction( rRect ) ); @@ -68,7 +71,7 @@ void OutputDevice::DrawRect( const Rectangle& rRect ) void OutputDevice::DrawRect( const Rectangle& rRect, sal_uLong nHorzRound, sal_uLong nVertRound ) { - assert_if_double_buffered_window(); + assert(!is_double_buffered_window()); if ( mpMetaFile ) mpMetaFile->AddAction( new MetaRoundRectAction( rRect, nHorzRound, nVertRound ) ); @@ -128,7 +131,7 @@ void OutputDevice::DrawRect( const Rectangle& rRect, void OutputDevice::DrawCheckered(const Point& rPos, const Size& rSize, sal_uInt32 nLen, Color aStart, Color aEnd) { - assert_if_double_buffered_window(); + assert(!is_double_buffered_window()); const sal_uInt32 nMaxX(rPos.X() + rSize.Width()); const sal_uInt32 nMaxY(rPos.Y() + rSize.Height()); @@ -154,7 +157,7 @@ void OutputDevice::DrawCheckered(const Point& rPos, const Size& rSize, sal_uInt3 void OutputDevice::DrawGrid( const Rectangle& rRect, const Size& rDist, DrawGridFlags nFlags ) { - assert_if_double_buffered_window(); + assert(!is_double_buffered_window()); Rectangle aDstRect( PixelToLogic( Point() ), GetOutputSize() ); aDstRect.Intersection( rRect ); |