diff options
author | nyamatongwe <devnull@localhost> | 2011-09-02 14:59:21 +1000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2011-09-02 14:59:21 +1000 |
commit | bca68a999e7b5c8245175c9eab6aef7e1f13f850 (patch) | |
tree | 91c4a87a963a7a02727d920291d602083e329529 | |
parent | a832b1427aafb556b4e07652755b07590a88a73d (diff) | |
download | scintilla-mirror-bca68a999e7b5c8245175c9eab6aef7e1f13f850.tar.gz |
Removed archaic unused deallocation calls.
-rw-r--r-- | gtk/PlatGTK.cxx | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx index b8ee6b385..39dba1d71 100644 --- a/gtk/PlatGTK.cxx +++ b/gtk/PlatGTK.cxx @@ -1592,7 +1592,6 @@ void SurfaceImpl::DrawTextBase(PRectangle rc, Font &font_, int ybase, const char int xText = rc.left; if (PFont(font_)->pfd) { char *utfForm = 0; - bool useGFree = false; if (et == UTF8) { pango_layout_set_text(layout, s, len); } else { @@ -1626,11 +1625,7 @@ void SurfaceImpl::DrawTextBase(PRectangle rc, Font &font_, int ybase, const char #else gdk_draw_layout_line(drawable, gc, xText, ybase, pll); #endif - if (useGFree) { - g_free(utfForm); - } else { - delete []utfForm; - } + delete []utfForm; return; } #ifndef DISABLE_GDK_FONT @@ -1808,7 +1803,6 @@ void SurfaceImpl::MeasureWidths(Font &font_, const char *s, int len, int *positi } if (positionsCalculated < 1 ) { // Either Latin1 or DBCS conversion failed so treat as Latin1. - bool useGFree = false; SetConverter(PFont(font_)->characterSet); char *utfForm = UTF8FromIconv(conv, s, len); if (!utfForm) { @@ -1830,11 +1824,7 @@ void SurfaceImpl::MeasureWidths(Font &font_, const char *s, int len, int *positi } clusterStart = clusterEnd; } - if (useGFree) { - g_free(utfForm); - } else { - delete []utfForm; - } + delete []utfForm; PLATFORM_ASSERT(i == lenPositions); } } @@ -1910,7 +1900,6 @@ int SurfaceImpl::WidthText(Font &font_, const char *s, int len) { char *utfForm = 0; pango_layout_set_font_description(layout, PFont(font_)->pfd); PangoRectangle pos; - bool useGFree = false; if (et == UTF8) { pango_layout_set_text(layout, s, len); } else { @@ -1933,11 +1922,7 @@ int SurfaceImpl::WidthText(Font &font_, const char *s, int len) { PangoLayoutLine *pangoLine = pango_layout_get_line(layout,0); #endif pango_layout_line_get_extents(pangoLine, NULL, &pos); - if (useGFree) { - g_free(utfForm); - } else { - delete []utfForm; - } + delete []utfForm; return PANGO_PIXELS(pos.width); } #ifndef DISABLE_GDK_FONT |