summaryrefslogtreecommitdiff
path: root/sw/inc
diff options
context:
space:
mode:
Diffstat (limited to 'sw/inc')
-rw-r--r--sw/inc/docary.hxx7
1 files changed, 2 insertions, 5 deletions
diff --git a/sw/inc/docary.hxx b/sw/inc/docary.hxx
index dce6a44b7576..5cd132f0ef44 100644
--- a/sw/inc/docary.hxx
+++ b/sw/inc/docary.hxx
@@ -131,7 +131,7 @@ public:
erase( begin() + aStartIdx, begin() + aEndIdx);
}
- size_t GetPos(Value const& p) const
+ size_t GetPos(typename std::remove_pointer_t<Value> const* const p) const
{
const_iterator const it = std::find(begin(), end(), p);
return it == end() ? SIZE_MAX : it - begin();
@@ -159,9 +159,6 @@ public:
virtual Value GetFormat(size_t idx) const override
{ return SwVectorModifyBase<Value>::operator[](idx); }
- size_t GetPos(const SwFormat *p) const
- { return SwVectorModifyBase<Value>::GetPos( static_cast<Value>( const_cast<SwFormat*>( p ) ) ); }
-
// Override return type to reduce casting
virtual Value FindFormatByName(const OUString& rName) const override
{ return static_cast<Value>(SwFormatsBase::FindFormatByName(rName)); }
@@ -230,7 +227,7 @@ private:
mutable sal_uInt32 m_nMaxMovedID = 1; //every move-redline pair get a unique ID, so they can find each other.
public:
~SwRedlineTable();
- bool Contains(const SwRangeRedline* p) const { return maVector.find(const_cast<SwRangeRedline*>(p)) != maVector.end(); }
+ bool Contains(const SwRangeRedline* p) const { return maVector.find(p) != maVector.end(); }
size_type GetPos(const SwRangeRedline* p) const;
bool Insert(SwRangeRedline*& p);