summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-01-10 20:23:51 +0100
committerStephan Bergmann <sbergman@redhat.com>2018-01-11 16:06:19 +0100
commit32c31ceb0da26c260661186b6c86831494902b58 (patch)
treec798408d5b4eb1323d42b4806fa7b60e2e999415 /svtools
parentd3f935c01f30b1b9d6fd0d4bab08e844535a7ee1 (diff)
Replace macro with function
Change-Id: Ie565845ffa9c310a5920fc0689bbe1758bcc194d Reviewed-on: https://gerrit.libreoffice.org/47749 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/graphic/grfmgr2.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/svtools/source/graphic/grfmgr2.cxx b/svtools/source/graphic/grfmgr2.cxx
index f6dd8a198e82..268d008ce4f6 100644
--- a/svtools/source/graphic/grfmgr2.cxx
+++ b/svtools/source/graphic/grfmgr2.cxx
@@ -38,8 +38,14 @@
#define WATERMARK_LUM_OFFSET 50
#define WATERMARK_CON_OFFSET -70
-#define MAP( cVal0, cVal1, nFrac ) ((sal_uInt8)((((long)(cVal0)<<20)+nFrac*((long)(cVal1)-(cVal0)))>>20))
+namespace {
+
+constexpr sal_uInt8 MAP(long cVal0, long cVal1, long nFrac) {
+ return (sal_uInt8)(((cVal0<<20)+nFrac*(cVal1-cVal0))>>20);
+}
+
+}
GraphicManager::GraphicManager( sal_uLong nCacheSize, sal_uLong nMaxObjCacheSize ) :
mnUsedSize(0),