diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-06 16:02:12 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-07 09:12:58 +0000 |
commit | b5e3f8a5fa98a249ecd50021c33cf2a5c7a3b4fc (patch) | |
tree | 7f09b0c1897bba078282fe7e78911c59f1118f04 /tools/source | |
parent | bcb8aaf6522745b236dead5963b24ecc6aa2eac7 (diff) |
remove ugly operator* in DynamicErrorInfo
I can see why you'd want to hide this horrible tunnelling of
information with objects registering themselves in a global list.
Urrgh.
Change-Id: Ib151a0d2d5a4508dc456e52883e488ce56d9a095
Reviewed-on: https://gerrit.libreoffice.org/33984
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'tools/source')
-rw-r--r-- | tools/source/ref/errinf.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/source/ref/errinf.cxx b/tools/source/ref/errinf.cxx index 4c3eb5209751..539151c40583 100644 --- a/tools/source/ref/errinf.cxx +++ b/tools/source/ref/errinf.cxx @@ -86,7 +86,7 @@ void DynamicErrorInfo_Impl::RegisterEDcr(DynamicErrorInfo *pDcr) void DynamicErrorInfo_Impl::UnRegisterEDcr(DynamicErrorInfo const *pDcr) { DynamicErrorInfo **ppDcr = TheEDcrData::get().ppDcr; - sal_uIntPtr lIdx = (((sal_uIntPtr)(*pDcr) & ERRCODE_DYNAMIC_MASK) >> ERRCODE_DYNAMIC_SHIFT) - 1; + sal_uIntPtr lIdx = ((pDcr->GetErrorCode() & ERRCODE_DYNAMIC_MASK) >> ERRCODE_DYNAMIC_SHIFT) - 1; DBG_ASSERT(ppDcr[lIdx]==pDcr,"ErrHdl: Error nicht gefunden"); if(ppDcr[lIdx]==pDcr) ppDcr[lIdx]=nullptr; @@ -105,7 +105,7 @@ ErrorInfo *ErrorInfo::GetErrorInfo(sal_uIntPtr lId) return new ErrorInfo(lId); } -DynamicErrorInfo::operator sal_uIntPtr() const +sal_uIntPtr DynamicErrorInfo::GetErrorCode() const { return pImpl->lErrId; } @@ -127,7 +127,7 @@ ErrorInfo* DynamicErrorInfo_Impl::GetDynamicErrorInfo(sal_uIntPtr lId) { sal_uIntPtr lIdx = ((lId & ERRCODE_DYNAMIC_MASK)>>ERRCODE_DYNAMIC_SHIFT)-1; DynamicErrorInfo* pDcr = TheEDcrData::get().ppDcr[lIdx]; - if(pDcr && (sal_uIntPtr)(*pDcr)==lId) + if(pDcr && pDcr->GetErrorCode()==lId) return pDcr; else return new ErrorInfo(lId & ~ERRCODE_DYNAMIC_MASK); |