[geany/geany] 4641ce: Remove an unnecessary local variable

Colomban Wendling git-noreply at xxxxx
Sun Dec 16 18:06:48 UTC 2018


Branch:      refs/heads/master
Author:      Colomban Wendling <ban at herbesfolles.org>
Committer:   Colomban Wendling <ban at herbesfolles.org>
Date:        Fri, 15 Jun 2018 20:37:13 UTC
Commit:      4641ce3e9ff5574eb2a9268451198733aad46ea2
             https://github.com/geany/geany/commit/4641ce3e9ff5574eb2a9268451198733aad46ea2

Log Message:
-----------
Remove an unnecessary local variable


Modified Paths:
--------------
    src/editor.c

Modified: src/editor.c
10 lines changed, 4 insertions(+), 6 deletions(-)
===================================================================
@@ -3116,7 +3116,7 @@ void editor_do_comment_toggle(GeanyEditor *editor)
 	gint count_commented = 0, count_uncommented = 0;
 	gchar sel[256];
 	const gchar *co, *cc;
-	gboolean break_loop = FALSE, single_line = FALSE;
+	gboolean single_line = FALSE;
 	gboolean first_line_was_comment = FALSE;
 	gboolean last_line_was_comment = FALSE;
 	gsize co_len;
@@ -3148,7 +3148,7 @@ void editor_do_comment_toggle(GeanyEditor *editor)
 
 	sci_start_undo_action(editor->sci);
 
-	for (i = first_line; (i <= last_line) && (! break_loop); i++)
+	for (i = first_line; i <= last_line; i++)
 	{
 		gint buf_len;
 
@@ -3208,7 +3208,6 @@ void editor_do_comment_toggle(GeanyEditor *editor)
 			}
 
 			/* break because we are already on the last line */
-			break_loop = TRUE;
 			break;
 		}
 	}
@@ -3287,7 +3286,7 @@ gint editor_do_comment(GeanyEditor *editor, gint line, gboolean allow_empty_line
 	gint count = 0;
 	gchar sel[256];
 	const gchar *co, *cc;
-	gboolean break_loop = FALSE, single_line = FALSE;
+	gboolean single_line = FALSE;
 	GeanyFiletype *ft;
 
 	g_return_val_if_fail(editor != NULL && editor->document->file_type != NULL, 0);
@@ -3320,7 +3319,7 @@ gint editor_do_comment(GeanyEditor *editor, gint line, gboolean allow_empty_line
 
 	sci_start_undo_action(editor->sci);
 
-	for (i = first_line; (i <= last_line) && (! break_loop); i++)
+	for (i = first_line; i <= last_line; i++)
 	{
 		gint buf_len;
 
@@ -3372,7 +3371,6 @@ gint editor_do_comment(GeanyEditor *editor, gint line, gboolean allow_empty_line
 				count = 1;
 
 				/* break because we are already on the last line */
-				break_loop = TRUE;
 				break;
 			}
 		}



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Commits mailing list