[gtk+/gtk-3-20] GtkProgressBar: trivial conditional optimisation
- From: Daniel Boles <dboles src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-20] GtkProgressBar: trivial conditional optimisation
- Date: Sat, 3 Dec 2016 17:22:23 +0000 (UTC)
commit 6053713acdcf758fe43e9f1bce5ad21477908a92
Author: Daniel Boles <dboles src gnome org>
Date: Sat Dec 3 02:35:27 2016 +0000
GtkProgressBar: trivial conditional optimisation
I'd hope the compiler would realise this for us, but let's be explicit.
gtk/gtkprogressbar.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkprogressbar.c b/gtk/gtkprogressbar.c
index 7f1ccca..eb032f0 100644
--- a/gtk/gtkprogressbar.c
+++ b/gtk/gtkprogressbar.c
@@ -441,8 +441,7 @@ update_fraction_classes (GtkProgressBar *pbar)
{
if (priv->fraction <= 0.0)
empty = TRUE;
-
- if (priv->fraction >= 1.0)
+ else if (priv->fraction >= 1.0)
full = TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]