summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2019-08-22 15:42:36 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2019-08-23 11:48:53 +0200
commit63dfd069b3a957361881c12ccba38c5a23b9a42f (patch)
treee7a9bd1027b19f44a7c58ea9c445ded435c838bc /chart2
parent61ed17cafc90d9b4303b52260f729638eed107c7 (diff)
Mark move ctors/assignments noexcept
This should enable using move semantics where possible e.g. in standard containers. According to https://en.cppreference.com/w/cpp/language/move_constructor: To make strong exception guarantee possible, user-defined move constructors should not throw exceptions. For example, std::vector relies on std::move_if_noexcept to choose between move and copy when the elements need to be relocated. Change-Id: I6e1e1cdd5cd430b139ffa2fa7031fb0bb625decb Reviewed-on: https://gerrit.libreoffice.org/77957 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/controller/drawinglayer/ViewElementListProvider.cxx2
-rw-r--r--chart2/source/controller/inc/ViewElementListProvider.hxx2
-rw-r--r--chart2/source/view/charttypes/VSeriesPlotter.cxx4
-rw-r--r--chart2/source/view/inc/VSeriesPlotter.hxx2
4 files changed, 5 insertions, 5 deletions
diff --git a/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx b/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx
index 047c434f87fc..8a28e975c256 100644
--- a/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx
+++ b/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx
@@ -45,7 +45,7 @@ ViewElementListProvider::ViewElementListProvider( DrawModelWrapper* pDrawModelWr
{
}
-ViewElementListProvider::ViewElementListProvider( ViewElementListProvider&& rOther )
+ViewElementListProvider::ViewElementListProvider(ViewElementListProvider&& rOther) noexcept
{
m_pDrawModelWrapper = rOther.m_pDrawModelWrapper;
m_pFontList = std::move(rOther.m_pFontList);
diff --git a/chart2/source/controller/inc/ViewElementListProvider.hxx b/chart2/source/controller/inc/ViewElementListProvider.hxx
index 07da949907af..f229a514b60a 100644
--- a/chart2/source/controller/inc/ViewElementListProvider.hxx
+++ b/chart2/source/controller/inc/ViewElementListProvider.hxx
@@ -35,7 +35,7 @@ class ViewElementListProvider final
{
public:
ViewElementListProvider( DrawModelWrapper* pDrawModelWrapper );
- ViewElementListProvider( ViewElementListProvider&& );
+ ViewElementListProvider(ViewElementListProvider&&) noexcept;
~ViewElementListProvider();
XColorListRef GetColorTable() const;
diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index e95961677d42..cacba0bab258 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -106,10 +106,10 @@ VDataSeriesGroup::VDataSeriesGroup( std::unique_ptr<VDataSeries> pSeries )
m_aSeriesVector[0] = std::move(pSeries);
}
-VDataSeriesGroup::VDataSeriesGroup( VDataSeriesGroup&& other )
+VDataSeriesGroup::VDataSeriesGroup(VDataSeriesGroup&& other) noexcept
: m_aSeriesVector( std::move(other.m_aSeriesVector) )
, m_bMaxPointCountDirty( other.m_bMaxPointCountDirty )
- , m_nMaxPointCount( std::move(other.m_nMaxPointCount) )
+ , m_nMaxPointCount( other.m_nMaxPointCount )
, m_aListOfCachedYValues( std::move(other.m_aListOfCachedYValues) )
{
}
diff --git a/chart2/source/view/inc/VSeriesPlotter.hxx b/chart2/source/view/inc/VSeriesPlotter.hxx
index ab6f8a81005b..572e428ac14a 100644
--- a/chart2/source/view/inc/VSeriesPlotter.hxx
+++ b/chart2/source/view/inc/VSeriesPlotter.hxx
@@ -85,7 +85,7 @@ class VDataSeriesGroup final
public:
VDataSeriesGroup() = delete;
VDataSeriesGroup( std::unique_ptr<VDataSeries> pSeries );
- VDataSeriesGroup( VDataSeriesGroup&& );
+ VDataSeriesGroup(VDataSeriesGroup&&) noexcept;
~VDataSeriesGroup();
void addSeries( std::unique_ptr<VDataSeries> pSeries );//takes ownership of pSeries