]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
libvaladoc: Clean up Api.Field constructor
authorRico Tzschichholz <ricotz@ubuntu.com>
Sun, 25 Nov 2018 12:50:42 +0000 (13:50 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sun, 25 Nov 2018 12:50:42 +0000 (13:50 +0100)
libvaladoc/api/field.vala
valadoc/treebuilder.vala

index f2f086d8d7db208d784b5b7b1f3d292d86811ff4..21948f035d3ec705347f3606b44788d58e6710ee 100644 (file)
@@ -30,15 +30,15 @@ public class Valadoc.Api.Field : Symbol {
        private string? cname;
 
        public Field (Node parent, SourceFile file, string name, Vala.SymbolAccessibility accessibility,
-                                 SourceComment? comment, string? cname, bool is_static, bool is_volatile,
+                                 SourceComment? comment,
                                  Vala.Field data)
        {
                base (parent, file, name, accessibility, comment, data);
 
-               this.is_static = !(parent is Namespace) && is_static;
-               this.is_volatile = is_volatile;
+               this.is_static = !(parent is Namespace) && data.binding == Vala.MemberBinding.STATIC;
+               this.is_volatile = data.is_volatile;
 
-               this.cname = cname;
+               this.cname = Vala.get_ccode_name (data);
        }
 
        /**
index 12ab908133b0b34109887331005ffacece43131f..dd0e2d65039ba59be192b38c46865b3f53150d15 100644 (file)
@@ -692,9 +692,6 @@ public class Valadoc.Drivers.TreeBuilder : Vala.CodeVisitor {
                                                                element.name,
                                                                element.access,
                                                                comment,
-                                                               Vala.get_ccode_name (element),
-                                                               element.binding == Vala.MemberBinding.STATIC,
-                                                               element.is_volatile,
                                                                element);
                node.field_type = create_type_reference (element.variable_type, node, node);
                symbol_map.set (element, node);