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 /vcl | |
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 'vcl')
-rw-r--r-- | vcl/generic/glyphs/gcach_ftyp.cxx | 10 | ||||
-rw-r--r-- | vcl/inc/octree.hxx | 21 | ||||
-rw-r--r-- | vcl/inc/outfont.hxx | 3 | ||||
-rw-r--r-- | vcl/inc/quartz/salvd.h | 3 | ||||
-rw-r--r-- | vcl/source/gdi/octree.cxx | 14 | ||||
-rw-r--r-- | vcl/source/outdev/text.cxx | 6 |
6 files changed, 25 insertions, 32 deletions
diff --git a/vcl/generic/glyphs/gcach_ftyp.cxx b/vcl/generic/glyphs/gcach_ftyp.cxx index 5688aac71867..85e01f3c598d 100644 --- a/vcl/generic/glyphs/gcach_ftyp.cxx +++ b/vcl/generic/glyphs/gcach_ftyp.cxx @@ -55,8 +55,6 @@ #include "rtl/instance.hxx" -typedef const FT_Vector* FT_Vector_CPtr; - #include <vector> // TODO: move file mapping stuff to OSL @@ -1471,7 +1469,7 @@ extern "C" { // TODO: wait till all compilers accept that calling conventions // for functions are the same independent of implementation constness, // then uncomment the const-tokens in the function interfaces below -static int FT_move_to( FT_Vector_CPtr p0, void* vpPolyArgs ) +static int FT_move_to( const FT_Vector* p0, void* vpPolyArgs ) { PolyArgs& rA = *static_cast<PolyArgs*>(vpPolyArgs); @@ -1482,14 +1480,14 @@ static int FT_move_to( FT_Vector_CPtr p0, void* vpPolyArgs ) return 0; } -static int FT_line_to( FT_Vector_CPtr p1, void* vpPolyArgs ) +static int FT_line_to( const FT_Vector* p1, void* vpPolyArgs ) { PolyArgs& rA = *static_cast<PolyArgs*>(vpPolyArgs); rA.AddPoint( p1->x, p1->y, POLY_NORMAL ); return 0; } -static int FT_conic_to( FT_Vector_CPtr p1, FT_Vector_CPtr p2, void* vpPolyArgs ) +static int FT_conic_to( const FT_Vector* p1, const FT_Vector* p2, void* vpPolyArgs ) { PolyArgs& rA = *static_cast<PolyArgs*>(vpPolyArgs); @@ -1506,7 +1504,7 @@ static int FT_conic_to( FT_Vector_CPtr p1, FT_Vector_CPtr p2, void* vpPolyArgs ) return 0; } -static int FT_cubic_to( FT_Vector_CPtr p1, FT_Vector_CPtr p2, FT_Vector_CPtr p3, void* vpPolyArgs ) +static int FT_cubic_to( const FT_Vector* p1, const FT_Vector* p2, const FT_Vector* p3, void* vpPolyArgs ) { PolyArgs& rA = *static_cast<PolyArgs*>(vpPolyArgs); rA.AddPoint( p1->x, p1->y, POLY_CONTROL ); diff --git a/vcl/inc/octree.hxx b/vcl/inc/octree.hxx index ad2968121e49..5210387967bc 100644 --- a/vcl/inc/octree.hxx +++ b/vcl/inc/octree.hxx @@ -39,9 +39,6 @@ typedef struct OctreeNode bool bLeaf; } NODE; -typedef NODE* PNODE; -typedef PNODE* PPNODE; - class ImpNodeCache; class BitmapReadAccess; @@ -50,11 +47,11 @@ class VCL_PLUGIN_PUBLIC Octree private: BitmapPalette aPal; - sal_uLong nMax; - sal_uLong nLeafCount; - sal_uLong nLevel; - PNODE pTree; - PNODE pReduce[ OCTREE_BITS + 1 ]; + sal_uLong nMax; + sal_uLong nLeafCount; + sal_uLong nLevel; + NODE* pTree; + NODE* pReduce[ OCTREE_BITS + 1 ]; BitmapColor* pColor; ImpNodeCache* pNodeCache; const BitmapReadAccess* pAcc; @@ -62,12 +59,12 @@ private: Octree() {} - void CreatePalette( PNODE pNode ); - void GetPalIndex( PNODE pNode ); + void CreatePalette( NODE* pNode ); + void GetPalIndex( NODE* pNode ); SAL_DLLPRIVATE void ImplCreateOctree(); - SAL_DLLPRIVATE void ImplDeleteOctree( PPNODE ppNode ); - SAL_DLLPRIVATE void ImplAdd( PPNODE ppNode ); + SAL_DLLPRIVATE void ImplDeleteOctree( NODE** ppNode ); + SAL_DLLPRIVATE void ImplAdd( NODE** ppNode ); SAL_DLLPRIVATE void ImplReduce(); public: diff --git a/vcl/inc/outfont.hxx b/vcl/inc/outfont.hxx index 6e03bf80a2a2..f9f5344904b0 100644 --- a/vcl/inc/outfont.hxx +++ b/vcl/inc/outfont.hxx @@ -277,12 +277,11 @@ public: }; #define MULTITEXTLINEINFO_RESIZE 16 -typedef ImplTextLineInfo* PImplTextLineInfo; class ImplMultiTextLineInfo { private: - PImplTextLineInfo* mpLines; + ImplTextLineInfo** mpLines; sal_Int32 mnLines; sal_Int32 mnSize; diff --git a/vcl/inc/quartz/salvd.h b/vcl/inc/quartz/salvd.h index 4a4e0f666481..b380988b1071 100644 --- a/vcl/inc/quartz/salvd.h +++ b/vcl/inc/quartz/salvd.h @@ -37,8 +37,7 @@ struct SalVirDevData }; typedef struct SalVirDevData SalVirDevData; -typedef SalVirDevData *SalVirDevDataPtr; -typedef SalVirDevDataPtr *SalVirDevDataHandle; +typedef SalVirDevData** SalVirDevDataHandle; class AquaSalGraphics; diff --git a/vcl/source/gdi/octree.cxx b/vcl/source/gdi/octree.cxx index 1de20edf9dfe..6a0d891910c8 100644 --- a/vcl/source/gdi/octree.cxx +++ b/vcl/source/gdi/octree.cxx @@ -65,7 +65,7 @@ Octree::Octree( const BitmapReadAccess& rReadAcc, sal_uLong nColors ) : pAcc ( &rReadAcc ) { pNodeCache = new ImpNodeCache( nColors ); - memset( pReduce, 0, ( OCTREE_BITS + 1 ) * sizeof( PNODE ) ); + memset( pReduce, 0, ( OCTREE_BITS + 1 ) * sizeof( NODE* ) ); ImplCreateOctree(); } @@ -119,7 +119,7 @@ void Octree::ImplCreateOctree() } } -void Octree::ImplDeleteOctree( PPNODE ppNode ) +void Octree::ImplDeleteOctree( NODE** ppNode ) { for ( sal_uLong i = 0UL; i < 8UL; i++ ) { @@ -131,7 +131,7 @@ void Octree::ImplDeleteOctree( PPNODE ppNode ) *ppNode = NULL; } -void Octree::ImplAdd( PPNODE ppNode ) +void Octree::ImplAdd( NODE** ppNode ) { // ggf. neuen Knoten erzeugen if( !*ppNode ) @@ -171,7 +171,7 @@ void Octree::ImplAdd( PPNODE ppNode ) void Octree::ImplReduce() { sal_uLong i; - PNODE pNode; + NODE* pNode; sal_uLong nRedSum = 0L; sal_uLong nGreenSum = 0L; sal_uLong nBlueSum = 0L; @@ -186,7 +186,7 @@ void Octree::ImplReduce() { if ( pNode->pChild[ i ] ) { - PNODE pChild = pNode->pChild[ i ]; + NODE* pChild = pNode->pChild[ i ]; nRedSum += pChild->nRed; nGreenSum += pChild->nGreen; @@ -206,7 +206,7 @@ void Octree::ImplReduce() nLeafCount -= --nChildren; } -void Octree::CreatePalette( PNODE pNode ) +void Octree::CreatePalette( NODE* pNode ) { if( pNode->bLeaf ) { @@ -221,7 +221,7 @@ void Octree::CreatePalette( PNODE pNode ) } -void Octree::GetPalIndex( PNODE pNode ) +void Octree::GetPalIndex( NODE* pNode ) { if ( pNode->bLeaf ) nPalIndex = pNode->nPalIndex; diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx index 392d4ef056ff..381d20ac4705 100644 --- a/vcl/source/outdev/text.cxx +++ b/vcl/source/outdev/text.cxx @@ -57,7 +57,7 @@ ImplMultiTextLineInfo::ImplMultiTextLineInfo() { - mpLines = new PImplTextLineInfo[MULTITEXTLINEINFO_RESIZE]; + mpLines = new ImplTextLineInfo*[MULTITEXTLINEINFO_RESIZE]; mnLines = 0; mnSize = MULTITEXTLINEINFO_RESIZE; } @@ -74,8 +74,8 @@ void ImplMultiTextLineInfo::AddLine( ImplTextLineInfo* pLine ) if ( mnSize == mnLines ) { mnSize += MULTITEXTLINEINFO_RESIZE; - PImplTextLineInfo* pNewLines = new PImplTextLineInfo[mnSize]; - memcpy( pNewLines, mpLines, mnLines*sizeof(PImplTextLineInfo) ); + ImplTextLineInfo** pNewLines = new ImplTextLineInfo*[mnSize]; + memcpy( pNewLines, mpLines, mnLines*sizeof(ImplTextLineInfo*) ); mpLines = pNewLines; } |