diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-03-26 15:30:02 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-03-26 15:33:34 +0100 |
commit | 0e9f7614893405dd27a00ccd7274ed3097ac73d7 (patch) | |
tree | 771e9fb41617a1d8426a3edab7becd7e74c89626 /registry | |
parent | 9bd2b842a5f332ac380c7447487078acc5732a29 (diff) |
const_cast: convert some C-style casts and remove some redundant ones
Change-Id: I32d7a1d4fed6ef5c56f485cd92464f2d0960e5fd
Diffstat (limited to 'registry')
-rw-r--r-- | registry/source/reflread.cxx | 2 | ||||
-rw-r--r-- | registry/source/reflwrit.cxx | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/registry/source/reflread.cxx b/registry/source/reflread.cxx index 23f267d5a369..532b75f05129 100644 --- a/registry/source/reflread.cxx +++ b/registry/source/reflread.cxx @@ -171,7 +171,7 @@ BlopObject::~BlopObject() { if (m_isCopied) { - delete[] const_cast<sal_uInt8*>(m_pBuffer); + delete[] m_pBuffer; } } diff --git a/registry/source/reflwrit.cxx b/registry/source/reflwrit.cxx index b35af8d3db4d..7bc706dc3d67 100644 --- a/registry/source/reflwrit.cxx +++ b/registry/source/reflwrit.cxx @@ -90,7 +90,7 @@ sal_uInt32 readString(const sal_uInt8* buffer, sal_Unicode* v, sal_uInt32 maxSiz { sal_uInt32 len = UINT16StringLen(buffer) + 1; sal_uInt32 i; - sal_uInt8* buff = (sal_uInt8*)buffer; + sal_uInt8* buff = const_cast<sal_uInt8*>(buffer); if(len > maxSize / 2) { @@ -108,7 +108,7 @@ sal_uInt32 readString(const sal_uInt8* buffer, sal_Unicode* v, sal_uInt32 maxSiz v[len - 1] = L'\0'; - return (buff - ((sal_uInt8*)buffer)); + return (buff - buffer); } sal_uInt32 writeFloat(sal_uInt8* buffer, float v) @@ -364,7 +364,7 @@ FieldEntry::~FieldEntry() (m_constValue.aString != NULL_WSTRING) ) { - delete[] (sal_Unicode*)m_constValue.aString; + delete[] m_constValue.aString; } } @@ -394,7 +394,7 @@ void FieldEntry::setData(const OString& name, (m_constValue.aString != NULL_WSTRING) ) { - delete[] (sal_Unicode*)m_constValue.aString; + delete[] m_constValue.aString; } m_access = access; |