diff options
author | Noel Grandin <noel@peralex.com> | 2015-06-29 14:04:27 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-06-30 09:13:24 +0200 |
commit | d16d9f950f8cb6d8948875372c9ff1f0aae9fb7a (patch) | |
tree | b8d2146504c704fb9dfa11ea835ae39ff49e3dec /lotuswordpro | |
parent | fa5822ce69bfc80ac8b1c5caa98de7e5c7ccf568 (diff) |
remove some unnecessary typedefs to pointer
that were really not helping make the code any clearer.
Found with a search
git grep -P 'typedef\s+\w+\s*\*\s*\w+\;'
and manual inspection
Change-Id: I6a5c031e9e060ad3623a7586ec8a8cc4fe6252e9
Diffstat (limited to 'lotuswordpro')
-rw-r--r-- | lotuswordpro/source/filter/bencont.cxx | 4 | ||||
-rw-r--r-- | lotuswordpro/source/filter/bento.hxx | 12 | ||||
-rw-r--r-- | lotuswordpro/source/filter/benval.cxx | 4 | ||||
-rw-r--r-- | lotuswordpro/source/filter/first.hxx | 3 | ||||
-rw-r--r-- | lotuswordpro/source/filter/tocread.cxx | 2 | ||||
-rw-r--r-- | lotuswordpro/source/filter/tocread.hxx | 4 |
6 files changed, 12 insertions, 17 deletions
diff --git a/lotuswordpro/source/filter/bencont.cxx b/lotuswordpro/source/filter/bencont.cxx index a09695184d90..81c14468e3f3 100644 --- a/lotuswordpro/source/filter/bencont.cxx +++ b/lotuswordpro/source/filter/bencont.cxx @@ -175,7 +175,7 @@ LtcBenContainer::LtcBenContainer(LwpSvStream * pStream) * @param number of bytes read * @return BenError */ -BenError LtcBenContainer::Read(BenDataPtr pBuffer, unsigned long MaxSize, +BenError LtcBenContainer::Read(void * pBuffer, unsigned long MaxSize, unsigned long * pAmtRead) { *pAmtRead = cpStream->Read(pBuffer, MaxSize); @@ -188,7 +188,7 @@ BenError LtcBenContainer::Read(BenDataPtr pBuffer, unsigned long MaxSize, * @param number of bytes to be read * @return BenError */ -BenError LtcBenContainer::ReadKnownSize(BenDataPtr pBuffer, unsigned long Amt) +BenError LtcBenContainer::ReadKnownSize(void * pBuffer, unsigned long Amt) { sal_uLong ulLength; ulLength = cpStream->Read(pBuffer, Amt); diff --git a/lotuswordpro/source/filter/bento.hxx b/lotuswordpro/source/filter/bento.hxx index c9abbdab39c1..cf2f2ac2f2d8 100644 --- a/lotuswordpro/source/filter/bento.hxx +++ b/lotuswordpro/source/filter/bento.hxx @@ -132,8 +132,6 @@ UtDefClassP(CBenTypeName); typedef unsigned char BenByte; typedef unsigned short BenWord; typedef unsigned long BenDWord; -typedef void * BenDataPtr; -typedef const void * BenConstDataPtr; typedef unsigned long BenContainerPos; typedef unsigned long BenObjectID; @@ -216,9 +214,9 @@ public: // Internal methods explicit LtcBenContainer(LwpSvStream * pStream); ~LtcBenContainer(); - BenError Read(BenDataPtr pBuffer, unsigned long MaxSize, + BenError Read(void * pBuffer, unsigned long MaxSize, unsigned long * pAmtRead); - BenError ReadKnownSize(BenDataPtr pBuffer, unsigned long Amt); + BenError ReadKnownSize(void * pBuffer, unsigned long Amt); BenError SeekToPosition(BenContainerPos Pos); BenError SeekFromEnd(long Offset); @@ -267,7 +265,7 @@ class CBenValue : public CBenIDListElmt { public: unsigned long GetValueSize(); - BenError ReadValueData(BenDataPtr pBuffer, + BenError ReadValueData(void * pBuffer, unsigned long Offset, unsigned long MaxSize, unsigned long * pAmtRead); pCBenProperty BEN_EXPORT GetProperty() { return cpProperty; } @@ -351,14 +349,14 @@ public: // Internal methods unsigned long Size) : CUtListElmt(&pValue->GetValueSegments()) { cpValue = pValue; cImmediate = false; cPos = Pos; cSize = Size; } - CBenValueSegment(pCBenValue pValue, BenConstDataPtr pImmData, + CBenValueSegment(pCBenValue pValue, const void * pImmData, unsigned short Size) : CUtListElmt(&pValue->GetValueSegments()) { cpValue = pValue; cImmediate = true; UtHugeMemcpy(cImmData, pImmData, Size); cSize = Size; } CBenValueSegment(BenContainerPos Pos, unsigned long Size) { cpValue = NULL; cImmediate = false; cPos = Pos; cSize = Size; } - CBenValueSegment(BenConstDataPtr pImmData, unsigned short Size) + CBenValueSegment(const void * pImmData, unsigned short Size) { cpValue = NULL; cImmediate = true; UtHugeMemcpy(cImmData, pImmData, Size); cSize = Size; } bool IsLast() diff --git a/lotuswordpro/source/filter/benval.cxx b/lotuswordpro/source/filter/benval.cxx index db505a84035f..239159eb9047 100644 --- a/lotuswordpro/source/filter/benval.cxx +++ b/lotuswordpro/source/filter/benval.cxx @@ -69,7 +69,7 @@ CBenValue::GetValueSize() } BenError -CBenValue::ReadValueData(BenDataPtr pReadBuffer, unsigned long Offset, +CBenValue::ReadValueData(void * pReadBuffer, unsigned long Offset, unsigned long Amt, unsigned long * pAmtRead) { BenError Err; @@ -77,7 +77,7 @@ CBenValue::ReadValueData(BenDataPtr pReadBuffer, unsigned long Offset, *pAmtRead = 0; pCBenValueSegment pCurrSeg = NULL; pLtcBenContainer pContainer = GetContainer(); - BenByteDataPtr pBuffer = static_cast<BenByteDataPtr>(pReadBuffer); + BenByte* pBuffer = static_cast<BenByte*>(pReadBuffer); /// pReadBuffer -- pointer to buffer of read result, allocated outside this function /// Offset -- read buffer's start offset address, relative value in the whole value stream diff --git a/lotuswordpro/source/filter/first.hxx b/lotuswordpro/source/filter/first.hxx index 68d20ce2d0a9..37311920a0ce 100644 --- a/lotuswordpro/source/filter/first.hxx +++ b/lotuswordpro/source/filter/first.hxx @@ -64,9 +64,6 @@ namespace OpenStormBento // String constants extern const char gsBenMagicBytes[]; -typedef BenByte * BenByteDataPtr; -typedef const BenByte * BenConstByteDataPtr; - pCBenNamedObject FindNamedObject(pCUtList pList, const char * sName, pCUtListElmt * ppPrev); diff --git a/lotuswordpro/source/filter/tocread.cxx b/lotuswordpro/source/filter/tocread.cxx index 135281abcde7..25f9b07dc0b1 100644 --- a/lotuswordpro/source/filter/tocread.cxx +++ b/lotuswordpro/source/filter/tocread.cxx @@ -496,7 +496,7 @@ CBenTOCReader::GetCode() } BenError -CBenTOCReader::GetData(BenDataPtr pBuffer, unsigned long Amt) +CBenTOCReader::GetData(void * pBuffer, unsigned long Amt) { if (! CanGetData(Amt)) return BenErr_ReadPastEndOfTOC; diff --git a/lotuswordpro/source/filter/tocread.hxx b/lotuswordpro/source/filter/tocread.hxx index 03dc96befe8b..7888575fd672 100644 --- a/lotuswordpro/source/filter/tocread.hxx +++ b/lotuswordpro/source/filter/tocread.hxx @@ -81,11 +81,11 @@ private: // Methods BenError GetByte(BenByte * pByte); BenError GetDWord(BenDWord * pDWord); BenByte GetCode(); - BenError GetData(BenDataPtr pBuffer, unsigned long Amt); + BenError GetData(void * pBuffer, unsigned long Amt); private: // Data pLtcBenContainer cpContainer; - BenByteDataPtr cpTOC; + BenByte* cpTOC; unsigned long cBlockSize; unsigned long cCurr; unsigned long cTOCSize; |