From 7a1c21e53fc4733a4bb52282ce0098fcc085ab0e Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 22 Nov 2017 09:33:32 +0200 Subject: loplugin:simplifybool for negation of comparison operator Change-Id: Ie56daf560185274754afbc7a09c432b5c2793791 Reviewed-on: https://gerrit.libreoffice.org/45068 Tested-by: Jenkins Reviewed-by: Noel Grandin --- vcl/unx/generic/print/common_gfx.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'vcl/unx') diff --git a/vcl/unx/generic/print/common_gfx.cxx b/vcl/unx/generic/print/common_gfx.cxx index 40894081cbd1..887c4370d356 100644 --- a/vcl/unx/generic/print/common_gfx.cxx +++ b/vcl/unx/generic/print/common_gfx.cxx @@ -378,7 +378,7 @@ void PrinterGfx::DrawPolygon (sal_uInt32 nPoints, const Point* pPath) { // premature end of operation - if (!(nPoints > 1) || (pPath == nullptr) || !(maFillColor.Is() || maLineColor.Is())) + if (nPoints <= 0 || (pPath == nullptr) || !(maFillColor.Is() || maLineColor.Is())) return; // setup closed path @@ -529,7 +529,7 @@ PrinterGfx::DrawPolygonBezier (sal_uInt32 nPoints, const Point* pPath, const Pol const sal_uInt32 nBezString = 1024; sal_Char pString[nBezString]; // premature end of operation - if (!(nPoints > 1) || (pPath == nullptr) || !(maFillColor.Is() || maLineColor.Is())) + if (nPoints <= 0 || (pPath == nullptr) || !(maFillColor.Is() || maLineColor.Is())) return; snprintf(pString, nBezString, "%li %li moveto\n", pPath[0].X(), pPath[0].Y()); -- cgit