From 6a789e617ed07bfddc516c8fc0cf94cd6dfe7250 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sat, 5 Oct 2019 13:32:10 +0200 Subject: improve SfxPoolItem operator== implementations (*) make them all call the superclass operator== (*) make the base class check which and typeid to ensure we are only comparing the safe subclasses together (*) remove a couple of operator== that were not doing anything useful Change-Id: Ia6234aed42df04157a5d6a323dc951916a9cb316 Reviewed-on: https://gerrit.libreoffice.org/80308 Tested-by: Jenkins Reviewed-by: Noel Grandin --- avmedia/source/avmediadummy.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'avmedia') diff --git a/avmedia/source/avmediadummy.cxx b/avmedia/source/avmediadummy.cxx index 74ac0ecf3a1d..2c642541bfb8 100644 --- a/avmedia/source/avmediadummy.cxx +++ b/avmedia/source/avmediadummy.cxx @@ -87,9 +87,10 @@ SfxPoolItem* MediaItem::Clone( SfxItemPool*) const return nullptr; } -bool MediaItem::operator==( const SfxPoolItem& ) const +bool MediaItem::operator==( const SfxPoolItem& rItem ) const { - return false; + assert(SfxPoolItem::operator==(rItem)); (void)rItem; + return false; } } // namespace avmedia -- cgit