[gedit/wip/search-fixes] ReplaceDialog: use ternary conditionals
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit/wip/search-fixes] ReplaceDialog: use ternary conditionals
- Date: Fri, 30 Aug 2013 11:03:22 +0000 (UTC)
commit 349efcf04988180b50d51e40c3a97074ac5103a9
Author: Sébastien Wilmet <swilmet gnome org>
Date: Fri Aug 30 12:59:26 2013 +0200
ReplaceDialog: use ternary conditionals
gedit/gedit-replace-dialog.c | 14 ++------------
1 files changed, 2 insertions(+), 12 deletions(-)
---
diff --git a/gedit/gedit-replace-dialog.c b/gedit/gedit-replace-dialog.c
index 2845927..7b8cd68 100644
--- a/gedit/gedit-replace-dialog.c
+++ b/gedit/gedit-replace-dialog.c
@@ -62,12 +62,7 @@ get_gedit_window (GeditReplaceDialog *dialog)
{
GtkWindow *transient_for = gtk_window_get_transient_for (GTK_WINDOW (dialog));
- if (transient_for != NULL)
- {
- return GEDIT_WINDOW (transient_for);
- }
-
- return NULL;
+ return transient_for != NULL ? GEDIT_WINDOW (transient_for) : NULL;
}
static GeditDocument *
@@ -75,12 +70,7 @@ get_active_document (GeditReplaceDialog *dialog)
{
GeditWindow *window = get_gedit_window (dialog);
- if (window != NULL)
- {
- return gedit_window_get_active_document (window);
- }
-
- return NULL;
+ return window != NULL ? gedit_window_get_active_document (window) : NULL;
}
static GtkSourceSearchContext *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]