[vala] Use default in switch to fix C warning
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] Use default in switch to fix C warning
- Date: Sun, 21 Mar 2010 09:50:33 +0000 (UTC)
commit ae42287ef9285072357ee6903e6c4f3ebc6938da
Author: Jürg Billeter <j bitron ch>
Date: Sun Mar 21 09:17:50 2010 +0100
Use default in switch to fix C warning
vala/valabinaryexpression.vala | 3 +--
vala/valaunaryexpression.vala | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/vala/valabinaryexpression.vala b/vala/valabinaryexpression.vala
index ed598f7..f6f7b87 100644
--- a/vala/valabinaryexpression.vala
+++ b/vala/valabinaryexpression.vala
@@ -119,9 +119,8 @@ public class Vala.BinaryExpression : Expression {
case BinaryOperator.OR: return "||";
case BinaryOperator.IN: return "in";
case BinaryOperator.COALESCE: return "??";
+ default: assert_not_reached ();
}
-
- assert_not_reached ();
}
public override string to_string () {
diff --git a/vala/valaunaryexpression.vala b/vala/valaunaryexpression.vala
index 53ebd9a..d2d38dd 100644
--- a/vala/valaunaryexpression.vala
+++ b/vala/valaunaryexpression.vala
@@ -87,9 +87,8 @@ public class Vala.UnaryExpression : Expression {
case UnaryOperator.DECREMENT: return "--";
case UnaryOperator.REF: return "ref ";
case UnaryOperator.OUT: return "out ";
+ default: assert_not_reached ();
}
-
- assert_not_reached ();
}
public override string to_string () {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]