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

loplugin:redundantcast: const_cast to same type

Change-Id: I610fd4cf9339fd5c18eb77e7c94ffd0f99e9b125
üst 14895324
......@@ -218,13 +218,9 @@ ServerFont* GlyphCache::CacheFont( const FontSelectPattern& rFontSelData )
void GlyphCache::UncacheFont( ServerFont& rServerFont )
{
// the interface for rServerFont must be const because a
// user who wants to release it only got const ServerFonts.
// The caching algorithm needs a non-const object
ServerFont* pFont = const_cast<ServerFont*>( &rServerFont );
if( (pFont->Release() <= 0) && (mnMaxSize <= mnBytesUsed) )
if( (rServerFont.Release() <= 0) && (mnMaxSize <= mnBytesUsed) )
{
mpCurrentGCFont = pFont;
mpCurrentGCFont = &rServerFont;
GarbageCollect();
}
}
......
......@@ -1668,7 +1668,7 @@ ImplDelData::~ImplDelData()
if( !mbDel && mpWindow )
{
// the window still exists but we were not removed
const_cast<vcl::Window*>(mpWindow.get())->ImplRemoveDel( this );
mpWindow.get()->ImplRemoveDel( this );
mpWindow = NULL;
}
}
......
......@@ -697,7 +697,7 @@ void ImpGraphic::ImplSetPrefSize( const Size& rPrefSize )
if(maSvgData.get() && maEx.IsEmpty())
{
// use maEx as local buffer for rendered svg
const_cast< ImpGraphic* >(this)->maEx = maSvgData->getReplacement();
maEx = maSvgData->getReplacement();
}
// #108077# Push through pref size to animation object,
......
......@@ -47,7 +47,7 @@ OUString SalGtkPicker::uritounicode(const gchar* pIn)
if (!pIn)
return OUString();
OUString sURL( const_cast<const sal_Char *>(pIn), strlen(pIn),
OUString sURL( pIn, strlen(pIn),
RTL_TEXTENCODING_UTF8 );
INetURLObject aURL(sURL);
......
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