[gnome-builder/wip/extensions] extension-point: use g_strv_contains()
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/extensions] extension-point: use g_strv_contains()
- Date: Mon, 29 Jun 2015 21:53:12 +0000 (UTC)
commit 58a7c0b831db9b0dec7b86cbcfdc8f6c8e7ae1e9
Author: Christian Hergert <christian hergert me>
Date: Mon Jun 29 14:51:45 2015 -0700
extension-point: use g_strv_contains()
libide/ide-extension-point.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/libide/ide-extension-point.c b/libide/ide-extension-point.c
index 5b8d826..883afe3 100644
--- a/libide/ide-extension-point.c
+++ b/libide/ide-extension-point.c
@@ -275,11 +275,8 @@ matches_value (IdeExtensionPoint *point,
parts = g_strsplit (line, ",", 0);
- for (i = 0; parts [i]; i++)
- {
- if (g_strcmp0 (parts [i], match_value))
- return TRUE;
- }
+ if (g_strv_contains ((const gchar * const *)parts, match_value))
+ return TRUE;
}
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]