Use less operator here to be consistent with the original idea (see comment)

This doesn't change the result of the BestIndex method

Change-Id: If1efc04feac3d4966c126b1fa93d017a4beafbe1
This commit is contained in:
Zolnai Tamás
2015-07-24 04:23:30 +02:00
parent 3f339c5e77
commit 9a23428ff0

View File

@@ -1361,17 +1361,17 @@ namespace
static void CalculateScheme(const BitmapColor& rBitmapColor, std::vector<int> &vScheme, sal_uInt16 nVariance)
{
vScheme.resize(3,1);
if( rBitmapColor.GetRed() > rBitmapColor.GetGreen() + nVariance )
if( rBitmapColor.GetRed() < rBitmapColor.GetGreen() + nVariance )
++vScheme[0];
if( rBitmapColor.GetRed() > rBitmapColor.GetBlue() + nVariance )
if( rBitmapColor.GetRed() < rBitmapColor.GetBlue() + nVariance )
++vScheme[0];
if( rBitmapColor.GetGreen() > rBitmapColor.GetRed() + nVariance )
if( rBitmapColor.GetGreen() < rBitmapColor.GetRed() + nVariance )
++vScheme[1];
if( rBitmapColor.GetGreen() > rBitmapColor.GetBlue() + nVariance )
if( rBitmapColor.GetGreen() < rBitmapColor.GetBlue() + nVariance )
++vScheme[1];
if( rBitmapColor.GetBlue() > rBitmapColor.GetRed() + nVariance )
if( rBitmapColor.GetBlue() < rBitmapColor.GetRed() + nVariance )
++vScheme[2];
if( rBitmapColor.GetBlue() > rBitmapColor.GetGreen() + nVariance )
if( rBitmapColor.GetBlue() < rBitmapColor.GetGreen() + nVariance )
++vScheme[2];
}