[gedit] spell-utils: mark a parameter as const in skip_no_spell_check()
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] spell-utils: mark a parameter as const in skip_no_spell_check()
- Date: Sun, 2 Aug 2015 11:29:36 +0000 (UTC)
commit 39b0017644ece1da6522458e902c8c22b7448b2c
Author: Sébastien Wilmet <swilmet gnome org>
Date: Sun Aug 2 13:24:47 2015 +0200
spell-utils: mark a parameter as const in skip_no_spell_check()
The @end parameter isn't modified, so it's clearer with const.
plugins/spell/gedit-spell-utils.c | 8 ++++++--
plugins/spell/gedit-spell-utils.h | 4 ++--
2 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/plugins/spell/gedit-spell-utils.c b/plugins/spell/gedit-spell-utils.c
index 7c59436..d6e2ec6 100644
--- a/plugins/spell/gedit-spell-utils.c
+++ b/plugins/spell/gedit-spell-utils.c
@@ -3,6 +3,7 @@
* This file is part of gedit
*
* Copyright (C) 2010 - Jesse van den Kieboom
+ * Copyright (C) 2015 - Sébastien Wilmet
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -48,9 +49,12 @@ gedit_spell_utils_is_digit (const gchar *text)
return TRUE;
}
+/* Returns %TRUE if @start is moved to the start of a word to spell check,
+ * located before @end.
+ */
gboolean
-gedit_spell_utils_skip_no_spell_check (GtkTextIter *start,
- GtkTextIter *end)
+gedit_spell_utils_skip_no_spell_check (GtkTextIter *start,
+ const GtkTextIter *end)
{
GtkSourceBuffer *buffer = GTK_SOURCE_BUFFER (gtk_text_iter_get_buffer (start));
diff --git a/plugins/spell/gedit-spell-utils.h b/plugins/spell/gedit-spell-utils.h
index e0dce2c..f66b957 100644
--- a/plugins/spell/gedit-spell-utils.h
+++ b/plugins/spell/gedit-spell-utils.h
@@ -27,8 +27,8 @@ G_BEGIN_DECLS
gboolean gedit_spell_utils_is_digit (const gchar *text);
-gboolean gedit_spell_utils_skip_no_spell_check (GtkTextIter *start,
- GtkTextIter *end);
+gboolean gedit_spell_utils_skip_no_spell_check (GtkTextIter *start,
+ const GtkTextIter *end);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]