diff options
| author | Ginger Bill <bill@gingerbill.org> | 2017-02-06 01:21:23 +0000 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2017-02-06 01:21:23 +0000 |
| commit | 9f2d9b596dab3f1409a92f218c3fc07a4839b295 (patch) | |
| tree | 042137e3d8b8b53538e7492d31263e63d761a2b9 /code | |
| parent | 00c74891570e3f3f2415e443d6625cc3eadb7d49 (diff) | |
Nearly implement dynamics map, missing insertion
Diffstat (limited to 'code')
| -rw-r--r-- | code/demo.odin | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/code/demo.odin b/code/demo.odin index 5c1ef40c0..e3e85769c 100644 --- a/code/demo.odin +++ b/code/demo.odin @@ -13,9 +13,10 @@ main :: proc() { Value :: type f32; m: map[int]Value; - m[123] = 345.0; - x, ok := m[123]; - if ok { + reserve(^m, 16); + defer free(m); + // m[123] = 345.0; + if x, ok := m[123]; ok { fmt.println(x); } |