Revision: 4944 http://geany.svn.sourceforge.net/geany/?rev=4944&view=rev Author: eht16 Date: 2010-05-22 19:39:38 +0000 (Sat, 22 May 2010)
Log Message: ----------- Remove two unnecessary g_strdups().
Modified Paths: -------------- trunk/ChangeLog trunk/plugins/classbuilder.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-05-22 19:39:27 UTC (rev 4943) +++ trunk/ChangeLog 2010-05-22 19:39:38 UTC (rev 4944) @@ -9,6 +9,8 @@ * src/build.c: Fix Run toolbar item sensitivity after the last document has been closed. + * plugins/classbuilder.c: + Remove two unnecessary g_strdups().
2010-05-19 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
Modified: trunk/plugins/classbuilder.c =================================================================== --- trunk/plugins/classbuilder.c 2010-05-22 19:39:27 UTC (rev 4943) +++ trunk/plugins/classbuilder.c 2010-05-22 19:39:38 UTC (rev 4944) @@ -592,7 +592,7 @@ { const gchar *namespace; gchar *namespace_down; - + namespace = gtk_entry_get_text(GTK_ENTRY(cc_dlg->class_namespace_entry)); namespace_down = g_ascii_strdown(namespace, -1); class_header = g_strconcat(namespace_down, class_name_down, ".h", NULL); @@ -874,23 +874,21 @@ } case GEANY_CLASS_TYPE_PHP: { - gchar *tmp_str; + const gchar *tmp_str;
class_info->source = g_strdup(gtk_entry_get_text(GTK_ENTRY(cc_dlg->source_entry)));
- tmp_str = g_strdup(gtk_entry_get_text(GTK_ENTRY(cc_dlg->class_namespace_entry))); + tmp_str = gtk_entry_get_text(GTK_ENTRY(cc_dlg->class_namespace_entry)); if (! utils_str_equal(tmp_str, "")) class_info->namespace_decl = g_strdup_printf("namespace %s;", tmp_str); else class_info->namespace_decl = g_strdup(""); - g_free(tmp_str);
- tmp_str = g_strdup(gtk_entry_get_text(GTK_ENTRY(cc_dlg->class_implements_entry))); + tmp_str = gtk_entry_get_text(GTK_ENTRY(cc_dlg->class_implements_entry)); if (! utils_str_equal(tmp_str, "")) class_info->implements_decl = g_strdup_printf(" implements %s", tmp_str); else class_info->implements_decl = g_strdup(""); - g_free(tmp_str);
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(cc_dlg->create_constructor_box)) && ! gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(cc_dlg->create_isabstract_box)))
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.