diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-01-24 11:09:42 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-01-24 19:43:51 +0100 |
commit | d5af010a3287381db9accbf20063087ee18fcb62 (patch) | |
tree | 328d7cdf23d8333a205ba329ce80d6c7851b15b4 /editeng | |
parent | 902698412183e93a1bd018200c63054a422f2636 (diff) |
Allocate ImpXPolygon::pPointAry as a true Point[]
...as the default Point ctor already zero-initializes its members, remvoing the
need for some memset calls (that cause -Werror=class-memaccess, "clearing an
object of non-trivial type ‘class Point’" with upcoming GCC 8). Other such
problematic memset calls are replaced with std::fill, which appears to produce
adequate code with recent compilers (looked at GCC 7.2 and 8, Clang 7, at -O2),
a tight loop of filling the memory with zeroes.
A follow-up commit might want to use unique_ptr or vector for pPointAry.
Change-Id: I566422b2213643ab762f0d87a25e745ec2f35ee4
Reviewed-on: https://gerrit.libreoffice.org/48488
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'editeng')
0 files changed, 0 insertions, 0 deletions