diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-06-20 12:54:44 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-06-20 15:05:43 +0200 |
commit | 7925b4de3f9213a1aadfe7a4b1153241f264f439 (patch) | |
tree | a1187dbbaf6aeaf4852d4655d3d4a1de11372f38 /sc/source/core | |
parent | 94be0c12fe419cc7f50f5cfc6cdf161805e7490f (diff) |
use std::monostate in std::variant
as suggest by llunak
Change-Id: Id22253198bff16eeb596e1a15ddaba1f6ac227d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136146
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/core')
-rw-r--r-- | sc/source/core/data/cellvalue.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sc/source/core/data/cellvalue.cxx b/sc/source/core/data/cellvalue.cxx index bf4099e023a6..44fde8c7ed03 100644 --- a/sc/source/core/data/cellvalue.cxx +++ b/sc/source/core/data/cellvalue.cxx @@ -280,7 +280,7 @@ ScCellValue::ScCellValue( const ScCellValue& r ) ScCellValue::ScCellValue(ScCellValue&& r) noexcept : maData(std::move(r.maData)) { - r.maData = true; // reset to empty; + r.maData = std::monostate(); // reset to empty; } ScCellValue::~ScCellValue() @@ -318,7 +318,7 @@ void ScCellValue::clear() noexcept } // Reset to empty value. - maData = true; + maData = std::monostate(); } void ScCellValue::set( double fValue ) @@ -475,7 +475,7 @@ void ScCellValue::release( ScDocument& rDoc, const ScAddress& rPos ) rDoc.SetEmptyCell(rPos); } - maData = true; // reset to empty + maData = std::monostate(); // reset to empty } void ScCellValue::release( ScColumn& rColumn, SCROW nRow, sc::StartListeningType eListenType ) @@ -503,7 +503,7 @@ void ScCellValue::release( ScColumn& rColumn, SCROW nRow, sc::StartListeningType rColumn.DeleteContent(nRow); } - maData = true; // reset to empty + maData = std::monostate(); // reset to empty } OUString ScCellValue::getString( const ScDocument& rDoc ) const @@ -532,7 +532,7 @@ ScCellValue& ScCellValue::operator=(ScCellValue&& rCell) noexcept { clear(); maData = std::move(rCell.maData); - rCell.maData = true; // reset to empty; + rCell.maData = std::monostate(); // reset to empty; return *this; } |