From 9f2d9b596dab3f1409a92f218c3fc07a4839b295 Mon Sep 17 00:00:00 2001 From: Ginger Bill Date: Mon, 6 Feb 2017 01:21:23 +0000 Subject: Nearly implement dynamics map, missing insertion --- code/demo.odin | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'code') 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); } -- cgit v1.2.3