Skip to content

Commit

Permalink
Fixed bug in constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
vigna committed May 20, 2020
1 parent ea251f9 commit 879ff17
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drv/ArrayMap.drv
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ public class ARRAY_MAP KEY_VALUE_GENERIC extends ABSTRACT_MAP KEY_VALUE_GENERIC
value[i] = e.ENTRY_GET_VALUE();
i++;
}
size = i;
}

/** Creates a new empty array map copying the entries of a given map.
Expand All @@ -95,10 +96,11 @@ public class ARRAY_MAP KEY_VALUE_GENERIC extends ABSTRACT_MAP KEY_VALUE_GENERIC
this(m.size());
int i = 0;
for(Map.Entry<? extends KEY_GENERIC_CLASS, ? extends VALUE_GENERIC_CLASS> e : m.entrySet()) {
key[i] = KEY_OBJ2TYPE(e.getKey());
value[i] = VALUE_OBJ2TYPE(e.getValue());
key[i] = KEY_CLASS2TYPE(e.getKey());
value[i] = VALUE_CLASS2TYPE(e.getValue());
i++;
}
size = i;
}

/** Creates a new array map with given key and value backing arrays, using the given number of elements.
Expand Down

0 comments on commit 879ff17

Please sign in to comment.