[vala/0.36: 124/212] codegen: Avoid silent casts if not needed
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.36: 124/212] codegen: Avoid silent casts if not needed
- Date: Sat, 14 Apr 2018 07:53:46 +0000 (UTC)
commit e1241f5efe74cdc91656fbc81a2d8a99052d38e2
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Thu Dec 14 17:17:13 2017 +0100
codegen: Avoid silent casts if not needed
codegen/valagerrormodule.vala | 4 ++--
codegen/valatyperegisterfunction.vala | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/codegen/valagerrormodule.vala b/codegen/valagerrormodule.vala
index 47056f1..e4f199c 100644
--- a/codegen/valagerrormodule.vala
+++ b/codegen/valagerrormodule.vala
@@ -372,9 +372,9 @@ public class Vala.GErrorModule : CCodeDelegateModule {
if (!(stop_at is TryStatement || stop_at is CatchClause)) {
var finally_block = (Block) null;
if (sym.parent_node is TryStatement) {
- finally_block = (sym.parent_node as TryStatement).finally_body;
+ finally_block = ((TryStatement) sym.parent_node).finally_body;
} else if (sym.parent_node is CatchClause) {
- finally_block = (sym.parent_node.parent_node as TryStatement).finally_body;
+ finally_block = ((TryStatement) sym.parent_node.parent_node).finally_body;
}
if (finally_block != null && finally_block != sym) {
diff --git a/codegen/valatyperegisterfunction.vala b/codegen/valatyperegisterfunction.vala
index 72793cd..dbfe923 100644
--- a/codegen/valatyperegisterfunction.vala
+++ b/codegen/valatyperegisterfunction.vala
@@ -240,7 +240,7 @@ public abstract class Vala.TypeRegisterFunction {
cond = condition;
} else {
cond = new CCodeFunctionCall (new CCodeIdentifier ("G_UNLIKELY"));
- (cond as CCodeFunctionCall).add_argument (condition);
+ ((CCodeFunctionCall) cond).add_argument (condition);
}
var cif = new CCodeIfStatement (cond, type_init);
type_block.add_statement (cif);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]