From 6ea5e99ce4c49e450c09eacd18ec4576e39fdb59 Mon Sep 17 00:00:00 2001 From: Javen O'Neal Date: Fri, 17 Jun 2016 07:59:01 +0000 Subject: [PATCH] move loop invariant outside of loop git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1748809 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/poi/ss/usermodel/ExtendedColor.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/java/org/apache/poi/ss/usermodel/ExtendedColor.java b/src/java/org/apache/poi/ss/usermodel/ExtendedColor.java index 414fbc40a..2259bbfc2 100644 --- a/src/java/org/apache/poi/ss/usermodel/ExtendedColor.java +++ b/src/java/org/apache/poi/ss/usermodel/ExtendedColor.java @@ -109,8 +109,9 @@ public abstract class ExtendedColor implements Color { System.arraycopy(rgb, 1, tmp, 0, 3); rgb = tmp; } + double tint = getTint(); for (int i = 0; i < rgb.length; i++){ - rgb[i] = applyTint(rgb[i] & 0xFF, getTint()); + rgb[i] = applyTint(rgb[i] & 0xFF, tint); } } return rgb;