Kaydet (Commit) fa80dae9 authored tarafından Jochen Nitschke's avatar Jochen Nitschke Kaydeden (comit) Noel Grandin

remove unnecessary casts

Which IDs are always sal_uInt16 and likely passed from defines

Change-Id: I134358289ccd338ef1ff6ba963e25a524e790f4e
Reviewed-on: https://gerrit.libreoffice.org/30498Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 1bbf7f65
...@@ -66,7 +66,7 @@ public: ...@@ -66,7 +66,7 @@ public:
SfxItemSet( SfxItemPool&); SfxItemSet( SfxItemPool&);
SfxItemSet( SfxItemPool&, sal_uInt16 nWhich1, sal_uInt16 nWhich2 ); SfxItemSet( SfxItemPool&, sal_uInt16 nWhich1, sal_uInt16 nWhich2 );
SfxItemSet( SfxItemPool&, int nWh1, int nWh2, int nNull, ... ); SfxItemSet( SfxItemPool&, sal_uInt16 nWh1, sal_uInt16 nWh2, sal_uInt16 nNull, ... );
SfxItemSet( SfxItemPool&, const sal_uInt16* nWhichPairTable ); SfxItemSet( SfxItemPool&, const sal_uInt16* nWhichPairTable );
virtual ~SfxItemSet(); virtual ~SfxItemSet();
......
...@@ -173,7 +173,7 @@ void SfxItemSet::InitRanges_Impl(va_list pArgs, sal_uInt16 nWh1, sal_uInt16 nWh2 ...@@ -173,7 +173,7 @@ void SfxItemSet::InitRanges_Impl(va_list pArgs, sal_uInt16 nWh1, sal_uInt16 nWh2
memset(static_cast<void*>(m_pItems), 0, sizeof(SfxPoolItem*) * nSize); memset(static_cast<void*>(m_pItems), 0, sizeof(SfxPoolItem*) * nSize);
} }
SfxItemSet::SfxItemSet(SfxItemPool& rPool, int nWh1, int nWh2, int nNull, ...) SfxItemSet::SfxItemSet(SfxItemPool& rPool, sal_uInt16 nWh1, sal_uInt16 nWh2, sal_uInt16 nNull, ...)
: m_pPool( &rPool ) : m_pPool( &rPool )
, m_pParent(nullptr) , m_pParent(nullptr)
, m_pWhichRanges(nullptr) , m_pWhichRanges(nullptr)
...@@ -181,17 +181,13 @@ SfxItemSet::SfxItemSet(SfxItemPool& rPool, int nWh1, int nWh2, int nNull, ...) ...@@ -181,17 +181,13 @@ SfxItemSet::SfxItemSet(SfxItemPool& rPool, int nWh1, int nWh2, int nNull, ...)
{ {
assert(nWh1 <= nWh2); assert(nWh1 <= nWh2);
if(!nNull) if (nNull == 0) // delimiter
InitRanges_Impl( InitRanges_Impl(nWh1, nWh2);
sal::static_int_cast< sal_uInt16 >(nWh1), else
sal::static_int_cast< sal_uInt16 >(nWh2)); {
else {
va_list pArgs; va_list pArgs;
va_start( pArgs, nNull ); va_start( pArgs, nNull );
InitRanges_Impl( InitRanges_Impl(pArgs, nWh1, nWh2, nNull);
pArgs, sal::static_int_cast< sal_uInt16 >(nWh1),
sal::static_int_cast< sal_uInt16 >(nWh2),
sal::static_int_cast< sal_uInt16 >(nNull));
va_end(pArgs); va_end(pArgs);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment