summaryrefslogtreecommitdiff
path: root/include/vcl
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2019-05-13 14:00:10 +0000
committerTomaž Vajngerl <quikee@gmail.com>2019-05-14 03:20:50 +0200
commitd14d1341f2b0cd62098425b36438ae20b887fe93 (patch)
treee1bb6f188239144e7792e678c903334e099e3b9c /include/vcl
parent0a3f9a7e113c184355d49dbd6bd2ed75b0980b1e (diff)
Switch everyone to stricter GetColorError
This replaces the variant in Color with the stricter one of BitmapColor. I couldn't find any reasoning for the lazy variant used in Color. Change-Id: I6dab3ab94a7f24ef5e80299d64267e3be8df888c Reviewed-on: https://gerrit.libreoffice.org/72234 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'include/vcl')
-rw-r--r--include/vcl/BitmapColor.hxx11
1 files changed, 0 insertions, 11 deletions
diff --git a/include/vcl/BitmapColor.hxx b/include/vcl/BitmapColor.hxx
index 4344a7bd242f..f6e1751a3be5 100644
--- a/include/vcl/BitmapColor.hxx
+++ b/include/vcl/BitmapColor.hxx
@@ -22,7 +22,6 @@
#include <vcl/dllapi.h>
#include <tools/color.hxx>
-#include <cassert>
#include <memory>
class VCL_DLLPUBLIC BitmapColor final : public Color
@@ -39,8 +38,6 @@ public:
inline sal_uInt8 GetAlpha() const;
inline void SetAlpha( sal_uInt8 cAlpha );
-
- inline sal_uInt16 GetColorError( const BitmapColor& rColor ) const;
};
inline BitmapColor::BitmapColor()
@@ -82,14 +79,6 @@ inline void BitmapColor::SetAlpha( sal_uInt8 cAlpha )
SetTransparency(cAlpha);
}
-inline sal_uInt16 BitmapColor::GetColorError( const BitmapColor& rColor ) const
-{
- return static_cast<sal_uInt16>(
- abs( static_cast<int>(GetBlue()) - static_cast<int>(rColor.GetBlue()) ) +
- abs( static_cast<int>(GetGreen()) - static_cast<int>(rColor.GetGreen()) ) +
- abs( static_cast<int>(GetRed()) - static_cast<int>(rColor.GetRed()) ) );
-}
-
#endif // INCLUDED_VCL_BITMAPCOLOR_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */