summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/inc/swrect.hxx16
-rw-r--r--sw/source/core/bastyp/swrect.cxx2
-rw-r--r--tools/source/generic/gen.cxx7
3 files changed, 11 insertions, 14 deletions
diff --git a/sw/inc/swrect.hxx b/sw/inc/swrect.hxx
index 1374295d26c5..9467b728f2e7 100644
--- a/sw/inc/swrect.hxx
+++ b/sw/inc/swrect.hxx
@@ -38,7 +38,7 @@ class SAL_WARN_UNUSED SW_DLLPUBLIC SwRect
public:
inline SwRect();
- inline SwRect( const SwRect &rRect );
+ inline SwRect( const SwRect &rRect ) = default;
inline SwRect( const Point& rLT, const Size& rSize );
inline SwRect( const Point& rLT, const Point& rRB );
inline SwRect( tools::Long X, tools::Long Y, tools::Long Width, tools::Long Height );
@@ -90,7 +90,7 @@ public:
inline bool IsEmpty() const;
inline void Clear();
- inline SwRect &operator = ( const SwRect &rRect );
+ SwRect &operator = ( const SwRect &rRect ) = default;
inline bool operator == ( const SwRect& rRect ) const;
inline bool operator != ( const SwRect& rRect ) const;
@@ -248,13 +248,6 @@ inline tools::Long SwRect::Bottom() const
return m_Size.getHeight() ? m_Point.getY() + m_Size.getHeight() - 1 : m_Point.getY();
}
-// operators
-inline SwRect &SwRect::operator = ( const SwRect &rRect )
-{
- m_Point = rRect.m_Point;
- m_Size = rRect.m_Size;
- return *this;
-}
inline bool SwRect::operator == ( const SwRect& rRect ) const
{
return (m_Point == rRect.m_Point && m_Size == rRect.m_Size);
@@ -306,11 +299,6 @@ inline SwRect::SwRect() :
m_Size( 0, 0 )
{
}
-inline SwRect::SwRect( const SwRect &rRect ) :
- m_Point( rRect.m_Point ),
- m_Size( rRect.m_Size )
-{
-}
inline SwRect::SwRect( const Point& rLT, const Size& rSize ) :
m_Point( rLT ),
m_Size( rSize )
diff --git a/sw/source/core/bastyp/swrect.cxx b/sw/source/core/bastyp/swrect.cxx
index a12b4aa92c34..62984819175a 100644
--- a/sw/source/core/bastyp/swrect.cxx
+++ b/sw/source/core/bastyp/swrect.cxx
@@ -240,4 +240,6 @@ SvStream& WriteSwRect(SvStream &rStream, const SwRect &rRect)
}
#endif
+static_assert( std::is_trivially_copyable< SwRect >::value );
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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: */