[gspell] Entry: minor code simplification



commit e85c850c547d1ec0dc7f771d6f9585dfd58d1507
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Thu Dec 22 19:57:09 2016 +0100

    Entry: minor code simplification
    
    I initially thought adding more conditions, but in the end I think those
    two are enough.

 gspell/gspell-entry.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/gspell/gspell-entry.c b/gspell/gspell-entry.c
index fdaee00..021cccb 100644
--- a/gspell/gspell-entry.c
+++ b/gspell/gspell-entry.c
@@ -88,12 +88,8 @@ G_DEFINE_TYPE (GspellEntry, gspell_entry, G_TYPE_OBJECT)
 static gboolean
 inline_spell_checking_is_enabled (GspellEntry *gspell_entry)
 {
-       if (!gspell_entry->inline_spell_checking)
-       {
-               return FALSE;
-       }
-
-       return gtk_entry_get_visibility (gspell_entry->entry);
+       return (gspell_entry->inline_spell_checking &&
+               gtk_entry_get_visibility (gspell_entry->entry));
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]