Commit cc9f9193 authored by Maciej (Matthew) Piechotka's avatar Maciej (Matthew) Piechotka
Browse files

Override read_only_view property in ReadOnlySortedMap and its subclasses

parent a1f0c00c
......@@ -46,6 +46,15 @@ internal class Gee.ReadOnlyBidirSortedMap<K,V> : ReadOnlySortedMap<K,V>, BidirSo
return new BidirMapIterator<K,V> ((_map as BidirSortedMap<K,V>).bidir_map_iterator ());
}
/**
* {@inheritDoc}
*/
public BidirSortedMap<K,V> read_only_view {
owned get {
return this;
}
}
protected class BidirMapIterator<K,V> : Gee.ReadOnlyMap.MapIterator<K,V>, Gee.BidirMapIterator<K,V> {
public BidirMapIterator (Gee.BidirMapIterator<K,V> iterator) {
base (iterator);
......
......@@ -77,5 +77,14 @@ internal class Gee.ReadOnlySortedMap<K,V> : ReadOnlyMap<K,V>, SortedMap<K,V> {
return (_map as SortedMap<K,V>).ascending_entries.read_only_view;
}
}
/**
* {@inheritDoc}
*/
public SortedMap<K, V> read_only_view {
owned get {
return this;
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment