From 22ae46a85086ee716dc5c6b727c76bfb9ccb7c0f Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 11 Nov 2020 16:29:05 +0000 Subject: use Point direct and drop a reinterpret_cast MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Idd8901225ddb687a2d1b8b5ba4069b40f218191f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105603 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- vcl/source/outdev/font.cxx | 53 +++++++++++++++++++++++----------------------- 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx index e633781ed040..71dc5e861fcf 100644 --- a/vcl/source/outdev/font.cxx +++ b/vcl/source/outdev/font.cxx @@ -278,32 +278,32 @@ void OutputDevice::ImplGetEmphasisMark( tools::PolyPolygon& rPolyPoly, bool& rPo PolyFlags::Normal, PolyFlags::Control, PolyFlags::Control }; - static const tools::Long aAccentPos[48] = + static const Point aAccentPos[24] = { - 78, 0, - 348, 79, - 599, 235, - 843, 469, - 938, 574, - 990, 669, - 990, 773, - 990, 843, - 964, 895, - 921, 947, - 886, 982, - 860, 999, - 825, 999, - 764, 999, - 721, 964, - 686, 895, - 625, 791, - 556, 660, - 469, 504, - 400, 400, - 261, 252, - 61, 61, - 0, 27, - 9, 0 + { 78, 0 }, + { 348, 79 }, + { 599, 235 }, + { 843, 469 }, + { 938, 574 }, + { 990, 669 }, + { 990, 773 }, + { 990, 843 }, + { 964, 895 }, + { 921, 947 }, + { 886, 982 }, + { 860, 999 }, + { 825, 999 }, + { 764, 999 }, + { 721, 964 }, + { 686, 895 }, + { 625, 791 }, + { 556, 660 }, + { 469, 504 }, + { 400, 400 }, + { 261, 252 }, + { 61, 61 }, + { 0, 27 }, + { 9, 0 } }; rWidth = 0; @@ -396,8 +396,7 @@ void OutputDevice::ImplGetEmphasisMark( tools::PolyPolygon& rPolyPoly, bool& rPo } else { - tools::Polygon aPoly( SAL_N_ELEMENTS( aAccentPos ) / 2, - reinterpret_cast(aAccentPos), + tools::Polygon aPoly( SAL_N_ELEMENTS(aAccentPos), aAccentPos, aAccentPolyFlags ); double dScale = static_cast(nDotSize)/1000.0; aPoly.Scale( dScale, dScale ); -- cgit