summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-05-11 12:51:33 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-05-11 12:51:33 +0200
commita71478d8ba7347f41c20585c56e1d5283757f82e (patch)
tree3b8f13526ce899687775147ec0a6fdf2f062d71f /vcl
parent4a1eddb6d7d27030b119cef147147d77c9a3ff5f (diff)
loplugin:cstylecast: nop between pointer types of exactly same spelling
Change-Id: I0f844c7265b52d668bc6a2368321950a1a00cce5
Diffstat (limited to 'vcl')
-rw-r--r--vcl/generic/fontmanager/parseAFM.cxx6
-rw-r--r--vcl/source/control/ilstbox.cxx4
-rw-r--r--vcl/source/fontsubset/cff.cxx2
-rw-r--r--vcl/source/fontsubset/ttcr.cxx8
-rw-r--r--vcl/source/gdi/gdimtf.cxx4
-rw-r--r--vcl/source/gdi/print.cxx2
-rw-r--r--vcl/source/gdi/virdev.cxx2
-rw-r--r--vcl/source/outdev/text.cxx4
-rw-r--r--vcl/unx/generic/app/i18n_xkb.cxx2
-rw-r--r--vcl/unx/gtk/window/gtksalmenu.cxx2
10 files changed, 18 insertions, 18 deletions
diff --git a/vcl/generic/fontmanager/parseAFM.cxx b/vcl/generic/fontmanager/parseAFM.cxx
index 267ef1c2c248..91c7a895c961 100644
--- a/vcl/generic/fontmanager/parseAFM.cxx
+++ b/vcl/generic/fontmanager/parseAFM.cxx
@@ -793,7 +793,7 @@ static int parseCharMetrics( FileInputStream* fp, FontInfo* fi)
break;
case CHARNAME:
if ((keyword = token(fp,tokenlen)) != NULL)
- temp->name = (char *)strdup(keyword);
+ temp->name = strdup(keyword);
break;
case CHARBBOX:
if ((keyword = token(fp,tokenlen)) != NULL)
@@ -818,9 +818,9 @@ static int parseCharMetrics( FileInputStream* fp, FontInfo* fi)
*tail = static_cast<Ligature *>(calloc(1, sizeof(Ligature)));
if ((keyword = token(fp,tokenlen)) != NULL)
- (*tail)->succ = (char *)strdup(keyword);
+ (*tail)->succ = strdup(keyword);
if ((keyword = token(fp,tokenlen)) != NULL)
- (*tail)->lig = (char *)strdup(keyword);
+ (*tail)->lig = strdup(keyword);
break; }
case ENDCHARMETRICS:
cont = false;
diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx
index ca1027a096cc..637263d1a58e 100644
--- a/vcl/source/control/ilstbox.cxx
+++ b/vcl/source/control/ilstbox.cxx
@@ -187,7 +187,7 @@ sal_Int32 ImplEntryList::InsertEntry( sal_Int32 nPos, ImplEntryType* pNewEntry,
else
{
nLow = mnMRUCount;
- pTemp = (ImplEntryType*)GetEntry( (sal_Int32)nLow );
+ pTemp = GetEntry( (sal_Int32)nLow );
nComp = rSorter.compare(rStr, pTemp->maStr);
if ( nComp <= 0 )
@@ -202,7 +202,7 @@ sal_Int32 ImplEntryList::InsertEntry( sal_Int32 nPos, ImplEntryType* pNewEntry,
do
{
nMid = (nLow + nHigh) / 2;
- pTemp = (ImplEntryType*)GetEntry( nMid );
+ pTemp = GetEntry( nMid );
nComp = rSorter.compare(rStr, pTemp->maStr);
diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx
index 2b477609ee59..9e2d1d3e44d0 100644
--- a/vcl/source/fontsubset/cff.cxx
+++ b/vcl/source/fontsubset/cff.cxx
@@ -1253,7 +1253,7 @@ if( mbSawError) {
int nRDCryptR = 4330; // TODO: mnRDCryptSeed;
for( U8* p = pT1Ops; p < mpWritePtr; ++p) {
*p ^= (nRDCryptR >> 8);
- nRDCryptR = (*(U8*)p + nRDCryptR) * 52845 + 22719;
+ nRDCryptR = (*p + nRDCryptR) * 52845 + 22719;
}
return nType1Len;
diff --git a/vcl/source/fontsubset/ttcr.cxx b/vcl/source/fontsubset/ttcr.cxx
index 813b5f65356a..6f467b0a0d6e 100644
--- a/vcl/source/fontsubset/ttcr.cxx
+++ b/vcl/source/fontsubset/ttcr.cxx
@@ -782,7 +782,7 @@ static int GetRawData_name(TrueTypeTable *_this, sal_uInt8 **ptr, sal_uInt32 *le
qsort(nr, n, sizeof(NameRecord), NameRecordCompareF);
int nameLen = stringLen + 12 * n + 6;
- sal_uInt8* name = (sal_uInt8*)ttmalloc(nameLen);
+ sal_uInt8* name = ttmalloc(nameLen);
PutUInt16(0, name, 0, 1);
PutUInt16(n, name, 2, 1);
@@ -911,7 +911,7 @@ TrueTypeTable *TrueTypeTableNew_head(sal_uInt32 fontRevision,
assert(created != 0);
TrueTypeTable* table = static_cast<TrueTypeTable*>(smalloc(sizeof(TrueTypeTable)));
- sal_uInt8* ptr = (sal_uInt8*)ttmalloc(TABLESIZE_head);
+ sal_uInt8* ptr = ttmalloc(TABLESIZE_head);
PutUInt32(0x00010000, ptr, 0, 1); /* version */
PutUInt32(fontRevision, ptr, 4, 1);
@@ -939,7 +939,7 @@ TrueTypeTable *TrueTypeTableNew_hhea(sal_Int16 ascender,
sal_Int16 caretSlopeRun)
{
TrueTypeTable* table = static_cast<TrueTypeTable*>(smalloc(sizeof(TrueTypeTable)));
- sal_uInt8* ptr = (sal_uInt8*)ttmalloc(TABLESIZE_hhea);
+ sal_uInt8* ptr = ttmalloc(TABLESIZE_hhea);
PutUInt32(0x00010000, ptr, 0, 1); /* version */
PutUInt16(ascender, ptr, 4, 1);
@@ -1016,7 +1016,7 @@ TrueTypeTable *TrueTypeTableNew_cmap()
cmap->s = static_cast<CmapSubTable *>(scalloc(CMAP_SUBTABLE_INIT, sizeof(CmapSubTable)));
memset(cmap->s, 0, sizeof(CmapSubTable) * CMAP_SUBTABLE_INIT);
- table->data = (table_cmap *) cmap;
+ table->data = cmap;
table->rawdata = 0;
table->tag = T_cmap;
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index 2701046a37eb..2b3415862be0 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -2875,11 +2875,11 @@ SvStream& GDIMetaFile::Write( SvStream& rOStm )
aWriteData.meActualCharSet = rOStm.GetStreamCharSet();
- MetaAction* pAct = (MetaAction*)FirstAction();
+ MetaAction* pAct = FirstAction();
while ( pAct )
{
pAct->Write( rOStm, &aWriteData );
- pAct = (MetaAction*)NextAction();
+ pAct = NextAction();
}
rOStm.SetEndian( nOldFormat );
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 590d6968c17b..ebc5f2b34f53 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -690,7 +690,7 @@ void Printer::ReleaseGraphics( bool bRelease )
ImplSVData* pSVData = ImplGetSVData();
- Printer* pPrinter = (Printer*)this;
+ Printer* pPrinter = this;
if ( !pPrinter->mpJobGraphics )
{
diff --git a/vcl/source/gdi/virdev.cxx b/vcl/source/gdi/virdev.cxx
index c453d91ef81d..e6c3fe1fe8fc 100644
--- a/vcl/source/gdi/virdev.cxx
+++ b/vcl/source/gdi/virdev.cxx
@@ -105,7 +105,7 @@ void VirtualDevice::ReleaseGraphics( bool bRelease )
ImplSVData* pSVData = ImplGetSVData();
- VirtualDevice* pVirDev = (VirtualDevice*)this;
+ VirtualDevice* pVirDev = this;
if ( bRelease )
pVirDev->mpVirDev->ReleaseGraphics( mpGraphics );
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index 7d2e65f91610..9dc3aa5213af 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -307,7 +307,7 @@ bool OutputDevice::ImplDrawTextDirect( SalLayout& rSalLayout,
rSalLayout.DrawBase().X() = w - 1 - x;
if( !IsRTLEnabled() )
{
- OutputDevice *pOutDevRef = (OutputDevice *)this;
+ OutputDevice *pOutDevRef = this;
// mirror this window back
long devX = w-pOutDevRef->mnOutWidth-pOutDevRef->mnOutOffX; // re-mirrored mnOutOffX
rSalLayout.DrawBase().X() = devX + ( pOutDevRef->mnOutWidth - 1 - (rSalLayout.DrawBase().X() - devX) ) ;
@@ -315,7 +315,7 @@ bool OutputDevice::ImplDrawTextDirect( SalLayout& rSalLayout,
}
else if( IsRTLEnabled() )
{
- OutputDevice *pOutDevRef = (OutputDevice *)this;
+ OutputDevice *pOutDevRef = this;
// mirror this window back
long devX = pOutDevRef->mnOutOffX; // re-mirrored mnOutOffX
diff --git a/vcl/unx/generic/app/i18n_xkb.cxx b/vcl/unx/generic/app/i18n_xkb.cxx
index cfc3bef7f3be..f9618f4d9826 100644
--- a/vcl/unx/generic/app/i18n_xkb.cxx
+++ b/vcl/unx/generic/app/i18n_xkb.cxx
@@ -57,7 +57,7 @@ SalI18N_KeyboardExtension::SalI18N_KeyboardExtension( Display* pDisplay )
int nExtMinorVersion = XkbMinorVersion;
mbUseExtension = XkbQueryExtension( mpDisplay,
- &nMajorExtOpcode, (int*)&mnEventBase, (int*)&mnErrorBase,
+ &nMajorExtOpcode, &mnEventBase, &mnErrorBase,
&nExtMajorVersion, &nExtMinorVersion ) != 0;
}
diff --git a/vcl/unx/gtk/window/gtksalmenu.cxx b/vcl/unx/gtk/window/gtksalmenu.cxx
index 73ca34b6ce69..94668ff00a4f 100644
--- a/vcl/unx/gtk/window/gtksalmenu.cxx
+++ b/vcl/unx/gtk/window/gtksalmenu.cxx
@@ -160,7 +160,7 @@ bool GtkSalMenu::PrepUpdate()
if (pFrame)
{
GtkSalFrame* pNonConstFrame = const_cast<GtkSalFrame*>(pFrame);
- GtkSalMenu* pSalMenu = ((GtkSalMenu*) this);
+ GtkSalMenu* pSalMenu = this;
if ( !pNonConstFrame->GetMenu() )
pNonConstFrame->SetMenu( pSalMenu );