Remove iptrdiff and uptrdiff. Bump version to 0.3.100

This commit is contained in:
Christoffer Lerno
2022-11-17 23:44:54 +01:00
parent bbef94b0fd
commit da1a45f718
61 changed files with 125 additions and 142 deletions

View File

@@ -10,14 +10,14 @@ struct Entry
{
Key key;
Type value;
usize hash;
usz hash;
Entry* next;
bool used;
}
struct Map
{
usize size;
usz size;
Entry* map;
uint mod;
}
@@ -37,7 +37,7 @@ fn Type! Map.valueForKey(Map *map, Key key)
{
if (!map.map) return MapResult.KEY_NOT_FOUND!;
uint hash = key.hash();
usize pos = hash & map.mod;
usz pos = hash & map.mod;
Entry* entry = &map.map[pos];
if (!entry) return MapResult.KEY_NOT_FOUND!;
while (entry)
@@ -91,7 +91,7 @@ fn Type! Map.set(Map *map, Key key, Type value) @maydiscard
}
}
fn usize Map.size(Map* map)
fn usz Map.size(Map* map)
{
return map.size;
}