diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-03-31 13:17:42 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-03-31 13:17:42 +0200 |
commit | 62e798c4a520a8b96e9113e363b1f26767231636 (patch) | |
tree | 7e0003b646bd68af83443890244dec1371499de7 /vcl/generic | |
parent | 9676efca531290ebde3839c5246abdde159499cf (diff) |
Reduce to static_cast any reinterpret_cast from void pointers
Change-Id: I65d76524847b57dcb17ee3f66e156ec1fd51b239
Diffstat (limited to 'vcl/generic')
-rw-r--r-- | vcl/generic/glyphs/gcach_ftyp.cxx | 10 | ||||
-rw-r--r-- | vcl/generic/glyphs/graphite_serverfont.cxx | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/vcl/generic/glyphs/gcach_ftyp.cxx b/vcl/generic/glyphs/gcach_ftyp.cxx index 93a79b1649ac..e7c73023452c 100644 --- a/vcl/generic/glyphs/gcach_ftyp.cxx +++ b/vcl/generic/glyphs/gcach_ftyp.cxx @@ -192,7 +192,7 @@ void FtFontFile::Unmap() // wrap FtFontInfo's table function const void * graphiteFontTable(const void* appFaceHandle, unsigned int name, size_t *len) { - const FtFontInfo * pFontInfo = reinterpret_cast<const FtFontInfo*>(appFaceHandle); + const FtFontInfo * pFontInfo = static_cast<const FtFontInfo*>(appFaceHandle); typedef union { char m_c[5]; unsigned int m_id; @@ -1473,7 +1473,7 @@ extern "C" { // then uncomment the const-tokens in the function interfaces below static int FT_move_to( FT_Vector_CPtr p0, void* vpPolyArgs ) { - PolyArgs& rA = *reinterpret_cast<PolyArgs*>(vpPolyArgs); + PolyArgs& rA = *static_cast<PolyArgs*>(vpPolyArgs); // move_to implies a new polygon => finish old polygon first rA.ClosePolygon(); @@ -1484,14 +1484,14 @@ static int FT_move_to( FT_Vector_CPtr p0, void* vpPolyArgs ) static int FT_line_to( FT_Vector_CPtr p1, void* vpPolyArgs ) { - PolyArgs& rA = *reinterpret_cast<PolyArgs*>(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 ) { - PolyArgs& rA = *reinterpret_cast<PolyArgs*>(vpPolyArgs); + PolyArgs& rA = *static_cast<PolyArgs*>(vpPolyArgs); // VCL's Polygon only knows cubic beziers const long nX1 = (2 * rA.GetPosX() + 4 * p1->x + 3) / 6; @@ -1508,7 +1508,7 @@ static int FT_conic_to( FT_Vector_CPtr p1, FT_Vector_CPtr p2, void* vpPolyArgs ) static int FT_cubic_to( FT_Vector_CPtr p1, FT_Vector_CPtr p2, FT_Vector_CPtr p3, void* vpPolyArgs ) { - PolyArgs& rA = *reinterpret_cast<PolyArgs*>(vpPolyArgs); + PolyArgs& rA = *static_cast<PolyArgs*>(vpPolyArgs); rA.AddPoint( p1->x, p1->y, POLY_CONTROL ); rA.AddPoint( p2->x, p2->y, POLY_CONTROL ); rA.AddPoint( p3->x, p3->y, POLY_NORMAL ); diff --git a/vcl/generic/glyphs/graphite_serverfont.cxx b/vcl/generic/glyphs/graphite_serverfont.cxx index 3549c01c8bab..84cdcf8ce044 100644 --- a/vcl/generic/glyphs/graphite_serverfont.cxx +++ b/vcl/generic/glyphs/graphite_serverfont.cxx @@ -32,7 +32,7 @@ float freetypeServerFontAdvance(const void* appFontHandle, gr_uint16 glyphId) { ServerFont * pServerFont = const_cast<ServerFont*> - (reinterpret_cast<const ServerFont*>(appFontHandle)); + (static_cast<const ServerFont*>(appFontHandle)); if (pServerFont) { return static_cast<float>(pServerFont->GetGlyphMetric(glyphId).GetCharWidth()); |