]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
libvaladoc: Drop unused code
authorRico Tzschichholz <ricotz@ubuntu.com>
Thu, 10 Oct 2019 16:01:22 +0000 (18:01 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Mon, 14 Oct 2019 07:43:30 +0000 (09:43 +0200)
libvaladoc/api/typereference.vala

index 1f099d7c1b01a39932621d639a6e9d14b1e4c0a1..54fb17c0298f03fd77e6486ec111cc5846ac844c 100644 (file)
@@ -44,10 +44,6 @@ public class Valadoc.Api.TypeReference : Item {
                this.parent = parent;
        }
 
-       bool is_reference_counting (Vala.TypeSymbol sym) {
-               return Vala.is_reference_counting (sym);
-       }
-
        bool type_reference_pass_ownership (Vala.DataType? element) {
                if (element == null) {
                        return false;
@@ -68,63 +64,6 @@ public class Valadoc.Api.TypeReference : Item {
                return false;
        }
 
-       bool is_type_reference_unowned (Vala.DataType? element) {
-                       if (element == null) {
-                               return false;
-                       }
-
-                       // non ref counted types are weak, not unowned
-                       if (element.data_type is Vala.TypeSymbol
-                               && is_reference_counting ((Vala.TypeSymbol) element.data_type) == true)
-                       {
-                               return false;
-                       }
-
-                       // FormalParameters are weak by default
-                       return (element.parent_node is Vala.Parameter == false)
-                               ? element.is_weak ()
-                               : false;
-       }
-
-       bool is_type_reference_owned (Vala.DataType? element) {
-               if (element == null) {
-                       return false;
-               }
-
-               weak Vala.CodeNode parent = element.parent_node;
-
-               // parameter:
-               if (parent is Vala.Parameter) {
-                       if (((Vala.Parameter)parent).direction != Vala.ParameterDirection.IN) {
-                               return false;
-                       }
-                       return ((Vala.Parameter)parent).variable_type.value_owned;
-               }
-
-               return false;
-       }
-
-       bool is_type_reference_weak (Vala.DataType? element) {
-               if (element == null) {
-                       return false;
-               }
-
-               // non ref counted types are unowned, not weak
-               if (element.data_type is Vala.TypeSymbol
-                       && is_reference_counting ((Vala.TypeSymbol) element.data_type) == false)
-               {
-                       return false;
-               }
-
-               // arrays are unowned, not weak
-               if (element is Vala.ArrayType) {
-                       return false;
-               }
-
-               // FormalParameters are weak by default
-               return (element.parent_node is Vala.Parameter == false)? element.is_weak () : false;
-       }
-
        Ownership get_type_reference_ownership (Vala.DataType? element) {
                unowned Vala.DataType? type = element;
                if (type != null) {