Kaydet (Commit) a98c1692 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

const_cast: convert some C-style casts and remove some redundant ones

Change-Id: I5493b2337dad102a4b22c6a6d646b4b0fd04e247
üst b627a4d9
...@@ -645,8 +645,8 @@ ImplGroupData* Config::ImplGetGroup() const ...@@ -645,8 +645,8 @@ ImplGroupData* Config::ImplGetGroup() const
// Always inherit group names and upate cache members // Always inherit group names and upate cache members
pGroup->maGroupName = maGroupName; pGroup->maGroupName = maGroupName;
((Config*)this)->mnDataUpdateId = mpData->mnDataUpdateId; const_cast<Config*>(this)->mnDataUpdateId = mpData->mnDataUpdateId;
((Config*)this)->mpActGroup = pGroup; const_cast<Config*>(this)->mpActGroup = pGroup;
} }
return mpActGroup; return mpActGroup;
......
...@@ -402,7 +402,7 @@ int INetMessageOStream::PutMsgLine(const sal_Char* pData, sal_uIntPtr nSize) ...@@ -402,7 +402,7 @@ int INetMessageOStream::PutMsgLine(const sal_Char* pData, sal_uIntPtr nSize)
sal_Size nDocSiz = pTargetMsg->GetDocumentSize(); sal_Size nDocSiz = pTargetMsg->GetDocumentSize();
sal_Size nWrite = 0; sal_Size nWrite = 0;
pLB->FillAppend((sal_Char*)pData, nSize, &nWrite); pLB->FillAppend(pData, nSize, &nWrite);
pTargetMsg->SetDocumentSize(nDocSiz + nWrite); pTargetMsg->SetDocumentSize(nDocSiz + nWrite);
if (nWrite < nSize) return INETSTREAM_STATUS_ERROR; if (nWrite < nSize) return INETSTREAM_STATUS_ERROR;
......
...@@ -177,7 +177,7 @@ long ZCodec::Write( SvStream& rOStm, const sal_uInt8* pData, sal_uIntPtr nSize ) ...@@ -177,7 +177,7 @@ long ZCodec::Write( SvStream& rOStm, const sal_uInt8* pData, sal_uIntPtr nSize )
assert(&rOStm == mpOStm); assert(&rOStm == mpOStm);
PZSTREAM->avail_in = nSize; 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 ) ) while ( PZSTREAM->avail_in || ( PZSTREAM->avail_out == 0 ) )
{ {
......
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