[Libreoffice-commits] core.git: tools/source

Stephan Bergmann sbergman at redhat.com
Wed Aug 26 23:17:10 PDT 2015


 tools/source/generic/color.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 475cbbb2596117231d36cf8a847b6d342323a3f8
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Aug 27 08:16:29 2015 +0200

    Remove redundant if (zero is already handled earlier)
    
    Change-Id: Iaab5763d4fbde431bac6f7ecbf4527ad889b6891

diff --git a/tools/source/generic/color.cxx b/tools/source/generic/color.cxx
index 3fb3294..87185b8 100644
--- a/tools/source/generic/color.cxx
+++ b/tools/source/generic/color.cxx
@@ -319,13 +319,13 @@ void Color::ApplyTintOrShade(sal_Int16 n100thPercent)
 
     basegfx::BColor aBColor = basegfx::tools::rgb2hsl(getBColor());
     double fFactor = 1.0 - (std::abs(double(n100thPercent)) / 10000.0);
-    double fResult = 0;
+    double fResult;
 
     if (n100thPercent > 0) // tint
     {
         fResult = aBColor.getBlue() * fFactor + (1.0 - fFactor);
     }
-    else if (n100thPercent < 0) // shade
+    else // shade
     {
         fResult = aBColor.getBlue() * fFactor;
     }


More information about the Libreoffice-commits mailing list