[gnome-calculator] math-equation: simplify some code
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calculator] math-equation: simplify some code
- Date: Tue, 29 Dec 2015 02:09:46 +0000 (UTC)
commit cf79ec3651ae2d757d3bf6bc08927fc96d899158
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Mon Dec 28 20:08:51 2015 -0600
math-equation: simplify some code
lib/math-equation.vala | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/lib/math-equation.vala b/lib/math-equation.vala
index f982865..fa04177 100644
--- a/lib/math-equation.vala
+++ b/lib/math-equation.vala
@@ -510,13 +510,9 @@ public class MathEquation : Gtk.SourceBuffer
undo_stack.remove (state);
redo_stack.prepend (get_current_state ());
- if (undo_stack == null)
- {
- apply_state (state);
- return;
- }
+ if (undo_stack != null)
+ state.ans = undo_stack.nth_data (0).ans;
- state.ans = undo_stack.nth_data (0).ans;
apply_state (state);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]