Kaydet (Commit) 475cbbb2 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Remove redundant if (zero is already handled earlier)

Change-Id: Iaab5763d4fbde431bac6f7ecbf4527ad889b6891
üst cce0620a
...@@ -319,13 +319,13 @@ void Color::ApplyTintOrShade(sal_Int16 n100thPercent) ...@@ -319,13 +319,13 @@ void Color::ApplyTintOrShade(sal_Int16 n100thPercent)
basegfx::BColor aBColor = basegfx::tools::rgb2hsl(getBColor()); basegfx::BColor aBColor = basegfx::tools::rgb2hsl(getBColor());
double fFactor = 1.0 - (std::abs(double(n100thPercent)) / 10000.0); double fFactor = 1.0 - (std::abs(double(n100thPercent)) / 10000.0);
double fResult = 0; double fResult;
if (n100thPercent > 0) // tint if (n100thPercent > 0) // tint
{ {
fResult = aBColor.getBlue() * fFactor + (1.0 - fFactor); fResult = aBColor.getBlue() * fFactor + (1.0 - fFactor);
} }
else if (n100thPercent < 0) // shade else // shade
{ {
fResult = aBColor.getBlue() * fFactor; fResult = aBColor.getBlue() * fFactor;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment