diff options
author | nyamatongwe <unknown> | 2011-09-02 14:59:21 +1000 |
---|---|---|
committer | nyamatongwe <unknown> | 2011-09-02 14:59:21 +1000 |
commit | bee370d047b32376fbf718c7dd0f3ef8f35b5036 (patch) | |
tree | f0728a978711a0f81bd77ca7376410f066ad4ff5 /gtk/PlatGTK.cxx | |
parent | f90956e86fd0cf150b241838f1b03870e043d9cb (diff) | |
download | scintilla-mirror-bee370d047b32376fbf718c7dd0f3ef8f35b5036.tar.gz |
Removed archaic unused deallocation calls.
Diffstat (limited to 'gtk/PlatGTK.cxx')
-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 |