summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2021-09-16 23:15:45 +0200
committerLuboš Luňák <l.lunak@collabora.com>2021-09-17 08:50:35 +0200
commite92fc5ec08563f3fdd0941008a2c97cef302afa0 (patch)
tree609b51b910b066b98cf052c3e7df37048fc4e665 /tools
parent8930b1f69e4b1c8c02902eb447c00b1d2b420e81 (diff)
ensure that some basic geometry classes are trivially copyable
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 <l.lunak@collabora.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/source/generic/gen.cxx7
1 files changed, 7 insertions, 0 deletions
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: */