diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-03-26 15:32:08 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-03-26 15:33:39 +0100 |
commit | a98c1692a6f98d73b38692131eebe7acce963299 (patch) | |
tree | 7bfbc2afb2deff8615a0cc6f9bc33ae4d62f31db /tools/source | |
parent | b627a4d98f66e1c7b36d12bc4683c7970c89d69f (diff) |
const_cast: convert some C-style casts and remove some redundant ones
Change-Id: I5493b2337dad102a4b22c6a6d646b4b0fd04e247
Diffstat (limited to 'tools/source')
-rw-r--r-- | tools/source/generic/config.cxx | 4 | ||||
-rw-r--r-- | tools/source/inet/inetstrm.cxx | 2 | ||||
-rw-r--r-- | tools/source/zcodec/zcodec.cxx | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/tools/source/generic/config.cxx b/tools/source/generic/config.cxx index 2454ddde6e3e..025db02ad106 100644 --- a/tools/source/generic/config.cxx +++ b/tools/source/generic/config.cxx @@ -645,8 +645,8 @@ ImplGroupData* Config::ImplGetGroup() const // Always inherit group names and upate cache members pGroup->maGroupName = maGroupName; - ((Config*)this)->mnDataUpdateId = mpData->mnDataUpdateId; - ((Config*)this)->mpActGroup = pGroup; + const_cast<Config*>(this)->mnDataUpdateId = mpData->mnDataUpdateId; + const_cast<Config*>(this)->mpActGroup = pGroup; } return mpActGroup; diff --git a/tools/source/inet/inetstrm.cxx b/tools/source/inet/inetstrm.cxx index ed555b0b6bf9..1ab22b18d9f9 100644 --- a/tools/source/inet/inetstrm.cxx +++ b/tools/source/inet/inetstrm.cxx @@ -402,7 +402,7 @@ int INetMessageOStream::PutMsgLine(const sal_Char* pData, sal_uIntPtr nSize) sal_Size nDocSiz = pTargetMsg->GetDocumentSize(); sal_Size nWrite = 0; - pLB->FillAppend((sal_Char*)pData, nSize, &nWrite); + pLB->FillAppend(pData, nSize, &nWrite); pTargetMsg->SetDocumentSize(nDocSiz + nWrite); if (nWrite < nSize) return INETSTREAM_STATUS_ERROR; diff --git a/tools/source/zcodec/zcodec.cxx b/tools/source/zcodec/zcodec.cxx index 5069b7c7d750..9693ccdc3620 100644 --- a/tools/source/zcodec/zcodec.cxx +++ b/tools/source/zcodec/zcodec.cxx @@ -177,7 +177,7 @@ long ZCodec::Write( SvStream& rOStm, const sal_uInt8* pData, sal_uIntPtr nSize ) assert(&rOStm == mpOStm); PZSTREAM->avail_in = nSize; - PZSTREAM->next_in = (unsigned char*)pData; + PZSTREAM->next_in = const_cast<unsigned char*>(pData); while ( PZSTREAM->avail_in || ( PZSTREAM->avail_out == 0 ) ) { |