diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-01-02 20:35:33 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-01-03 08:53:17 +0100 |
commit | 3140d30ba56b95536e9f92ef3074579524791fe5 (patch) | |
tree | 47f57f036133ad06b4fff5ce63c842c40af0e4ef /svl/source/items/cenumitm.cxx | |
parent | f4e8c28e465d103a7ac4bc711e3b23ad3cae9996 (diff) |
tighten up asserting in SfxPoolItem::operator==
...subclasses, so we always call the SfxPoolItem::operatar==
which will ensure that we are always comparing two objects that
belong to the same class.
And fix the fallout in SvxUnoNameItemTable.
Change-Id: I5ec7fedaa914a328897b54c016ad13e505a15937
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108599
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svl/source/items/cenumitm.cxx')
-rw-r--r-- | svl/source/items/cenumitm.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/svl/source/items/cenumitm.cxx b/svl/source/items/cenumitm.cxx index 3d0b7e581d52..a2b62d132c23 100644 --- a/svl/source/items/cenumitm.cxx +++ b/svl/source/items/cenumitm.cxx @@ -91,7 +91,7 @@ SfxPoolItem* SfxBoolItem::CreateDefault() // virtual bool SfxBoolItem::operator ==(const SfxPoolItem & rItem) const { - assert(dynamic_cast<const SfxBoolItem*>(&rItem) != nullptr); + assert(SfxPoolItem::operator==(rItem)); return m_bValue == static_cast< SfxBoolItem const * >(&rItem)->m_bValue; } |