summaryrefslogtreecommitdiff
path: root/vala/valapointertype.vala
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2020-06-11 11:59:46 +0200
committerRico Tzschichholz <ricotz@ubuntu.com>2020-06-11 14:56:06 +0200
commit485beb1f34bdba917dc035cd29fa871cf0ff9581 (patch)
treee6e06fd01476361abd7d611fbc20f5da80fa1d7e /vala/valapointertype.vala
parentcc88b7f4cd94331be95039099d69430c2063ad1b (diff)
downloadvala-485beb1f34bdba917dc035cd29fa871cf0ff9581.tar.gz
vala: Reduce calls of CodeContext.get()
Diffstat (limited to 'vala/valapointertype.vala')
-rw-r--r--vala/valapointertype.vala4
1 files changed, 3 insertions, 1 deletions
diff --git a/vala/valapointertype.vala b/vala/valapointertype.vala
index 6efbad9bd..a8806230e 100644
--- a/vala/valapointertype.vala
+++ b/vala/valapointertype.vala
@@ -83,7 +83,9 @@ public class Vala.PointerType : DataType {
return base_type.compatible (target_type);
}
- if (CodeContext.get ().profile == Profile.GOBJECT && target_type.type_symbol != null && target_type.type_symbol.is_subtype_of (CodeContext.get ().analyzer.gvalue_type.type_symbol)) {
+ var context = CodeContext.get ();
+
+ if (context.profile == Profile.GOBJECT && target_type.type_symbol != null && target_type.type_symbol.is_subtype_of (context.analyzer.gvalue_type.type_symbol)) {
// allow implicit conversion to GValue
return true;
}