~vcs-imports/libgee/trunk

« back to all changes in this revision

Viewing changes to gee/readonlysortedmap.vala

  • Committer: Rico Tzschichholz
  • Date: 2019-09-25 17:07:31 UTC
  • Revision ID: git-v1:505698ad479085ed969b355c243fe457d07fea4c
Fix "Access to possible `null'" warnings and use unsafe casts

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
         * {@inheritDoc}
44
44
         */
45
45
        public SortedMap<K,V> head_map (K before) {
46
 
                return (_map as SortedMap<K,V>).head_map (before).read_only_view;
 
46
                return ((SortedMap<K,V>) _map).head_map (before).read_only_view;
47
47
        }
48
48
 
49
49
        /**
50
50
         * {@inheritDoc}
51
51
         */
52
52
        public SortedMap<K,V> tail_map (K after) {
53
 
                return (_map as SortedMap<K,V>).tail_map (after).read_only_view;
 
53
                return ((SortedMap<K,V>) _map).tail_map (after).read_only_view;
54
54
        }
55
55
 
56
56
        /**
57
57
         * {@inheritDoc}
58
58
         */
59
59
        public SortedMap<K,V> sub_map (K from, K to) {
60
 
                return (_map as SortedMap<K,V>).sub_map (from, to).read_only_view;
 
60
                return ((SortedMap<K,V>) _map).sub_map (from, to).read_only_view;
61
61
        }
62
62
 
63
63
        /**
65
65
         */
66
66
        public SortedSet<K> ascending_keys {
67
67
                owned get {
68
 
                        return (_map as SortedMap<K,V>).ascending_keys.read_only_view;
 
68
                        return ((SortedMap<K,V>) _map).ascending_keys.read_only_view;
69
69
                }
70
70
        }
71
71
 
74
74
         */
75
75
        public SortedSet<Map.Entry<K,V>> ascending_entries {
76
76
                owned get {
77
 
                        return (_map as SortedMap<K,V>).ascending_entries.read_only_view;
 
77
                        return ((SortedMap<K,V>) _map).ascending_entries.read_only_view;
78
78
                }
79
79
        }
80
80