From 9f69d9e86102110f37b26ed9d484a1cde3ca27d8 Mon Sep 17 00:00:00 2001 From: Brendan Hansen Date: Mon, 14 Dec 2020 11:50:49 -0600 Subject: [PATCH] updated day 7 to not use deprecated 'StrMap' --- day7.onyx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/day7.onyx b/day7.onyx index 82622d2..3027e69 100644 --- a/day7.onyx +++ b/day7.onyx @@ -5,7 +5,7 @@ use package core.string.reader as reader BagGraph :: struct { nodes : [..] ^BagNode; - node_map : strmap.StrMap(^BagNode); + node_map : map.Map(str, ^BagNode); } BagNode :: struct { @@ -24,16 +24,16 @@ BagContainment :: struct { bg_init :: proc (use graph: ^BagGraph) { array.init(^nodes, 16); - strmap.init(^node_map); + map.init(^node_map); } bg_free :: proc (use graph: ^BagGraph) { array.free(^nodes); - strmap.free(^node_map); + map.free(^node_map); } bg_get_node :: proc (use graph: ^BagGraph, name: str) -> ^BagNode { - node := strmap.get(^node_map, name); + node := map.get(^node_map, name); if node == null { node = calloc(sizeof BagNode); @@ -44,7 +44,7 @@ bg_get_node :: proc (use graph: ^BagGraph, name: str) -> ^BagNode { node.color = name; array.push(^nodes, node); - strmap.put(^node_map, node.color, node); + map.put(^node_map, node.color, node); } return node; -- 2.25.1