From e92fc5ec08563f3fdd0941008a2c97cef302afa0 Mon Sep 17 00:00:00 2001 From: Luboš Luňák Date: Thu, 16 Sep 2021 23:15:45 +0200 Subject: ensure that some basic geometry classes are trivially copyable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit They in practice are, since they are just integers, but SwRect had explicit implementations of some functions that technically prevented SwRect from being considered trivially copyable, even though they were identical to default implementations. Change-Id: Ib5086dcd5279f3b4c0c530535c91524671cc6656 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122213 Tested-by: Jenkins Reviewed-by: Luboš Luňák --- tools/source/generic/gen.cxx | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tools/source') diff --git a/tools/source/generic/gen.cxx b/tools/source/generic/gen.cxx index 29e7da9b98fa..9c9c04903f19 100644 --- a/tools/source/generic/gen.cxx +++ b/tools/source/generic/gen.cxx @@ -223,4 +223,11 @@ tools::Long tools::Rectangle::AdjustBottom( tools::Long nVertMoveDelta ) return nBottom; } +static_assert( std::is_trivially_copyable< Pair >::value ); +static_assert( std::is_trivially_copyable< Point >::value ); +static_assert( std::is_trivially_copyable< Size >::value ); +static_assert( std::is_trivially_copyable< Range >::value ); +static_assert( std::is_trivially_copyable< Selection >::value ); +static_assert( std::is_trivially_copyable< tools::Rectangle >::value ); + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit